Constant of integration for solving differential equation As I am progressing differential equations practice, I found myself at somewhat of a roadblock. The roadblock is essentially that let's say we have the following equation:$$\int x^2\,dx=\int y\,dy.$$Now when we put the constants down after integration, such as:$$\frac{x^3}{3}+c_1=\frac{y^2}{2}+c_2,$$would $c_1$ and $c_2$ not have to have the same value? Of course, the problem then becomes that the constant would cancel out, and there would be no constant in the solution. However, I was just wondering why the constants could be different, especially since we need to ensure that both left and right antiderivatives are the same function?
In the case that the constants can be different, would someone be able to explain why that can be the case? Thanks so much.
 A: Let's consider a specific differential equation to fix ideas. Consider the equation $(\ast)$:
$$
y' - y = 0.\tag{$\ast$}
$$
Being an equation, a function $y$ may or may not solve $(\ast)$. One of the common ways to find solutions to $(\ast)$ is to "separate variables" and "integrate both sides" of the resulting equation:
$$
\int \frac{dy}{y} = \int dx.
$$
How do we interpret this? The left-hand side is an indefinite integral of $\frac{1}{y}$, which is essentially notation for any antiderivative for the function $\frac{1}{y}$, and the right-hand side is an indefinite integral of $1$. We know that an antiderivative is unique, besides the addition of an arbitrary constant term. What separating variables and integrating both sides has allowed us to see is that for any constant $C$, if $y$ satisfies
$$
\log y = x + C,
$$
then $y$ solves the original equation $(\ast)$. In other words, we have determined a family of solutions of the form $y = e^{x+C}=e^Ce^x$ which are solutions to $(\ast)$.
A related investigation is to seek solutions to the connected initial value problem $(\ast\ast)$:
$$
\begin{cases}
y' - y = 0 \\
y(0) = 1.
\end{cases}
$$
In other words, we seek a solution to $(\ast)$ with the additional condition that $y(0) = 1$. By the method of separating variables, we were able to see $y = e^Ce^x$ is a solution to $(\ast)$ for any $C$. If we also require $y = e^Ce^x$ to satisfy $y(0) = 1$, then it's clear we can choose the specific value of $C = 0$, and then $y = e^x$ solves $(\ast\ast)$.
A: As Sean mentioned in the comments... The constants are entirely determined by the initial conditions of your equation. Given your equation we have;
$${x^3\over3}+C_1={y^2\over2}+C_2 \implies {x^3\over3}+C_3={y^2\over2}$$
$$y=\bigg({2x^3\over3}+C_4\bigg)^{1\over 2}$$
Where $C_3=C_1-C_2$ and $C_4=2C_3$.
Now lets say that we were given the initial condition $y(0)=1$. That would yield...
$$y(0)=(C_4)^{1\over2}=1 \implies C_4=2C_3=2(C_1-C_2)=1$$
$$\therefore C_1-C_2={1\over2}$$
So $\textbf{any}$ 2 constants ($C_1$ and $C_2$) which satisfy that condition will give a legitimate solution to your equation with the given initial condition.
A: $$\int x^2\,dx=\int y\,dy.$$
Integrating,
$$\frac{x^3}{3}+c_1=\frac{y^2}{2}+c_2,$$
The sum, difference, or any other arbitrary function of  $c_1$ and $c_2$ would be another new arbitrary constant...say $c.$ We can merge them together into one constant.
$$\frac{x^3}{3}-\frac{y^2}{2}=c, $$
To evaluate new constant $c$ let's say boundary condition is
$$x=0, y=1 \to c=-\frac12$$
so that
$$\frac{x^3}{3}-\frac{y^2}{2}=-\frac12  $$
or
$$ y= \sqrt{1+\frac{2 x^3}{3}}.$$
