Solving particular solutions of higher order integrals Given the differential equation: $\frac{d^2y}{dx^2}=6x$
Integrating twice would yield the general solution: $y = x^3 +C_1x+C_2$
With the constraint $y'(0)=2$ and $y(0)=1$. The particular solution would be:
$y=x^3+2x+1$
A bit of an elementary question, but why wouldn't $2x$ cancel out when substituting $0$ in the second constraint when solving for $C_2$?
Following that: $2=3(0)^2+C_1$ from the first integration
and $1 = 0^3+2(0)+C_2$ from the second integration
Was the given correct particular solution incorrect? Or is it my understanding?
 A: Your particular solution (ofcourse in the form of general solution) should satisfy those two constraints for which you need to find particular values of $C_1$ and $C_2$. Once, you get these two constants, you substitute their values in the general solution. The equation you get after applying the initial condition (constraints) , e.g., $1=(0)^3+2(0)+C_2$, are not same as particular solution or general solution. They are just equations to find the particular constant which make the particular solution solution satisfy the initial conditions.
Answer of your last comment:
Yes $\begin{cases} 2=3(0)^2+C_1 \\ 1=(0)^3+2(0)+C_2 \end{cases}$ is a system of equations that $C_1$ and $C_2$ should satisfy so that, when you apply the initial condition to your particular solution, it reduces to an identity in $\Bbb R$.
For instance, applying initial condition $y'(0)=2$ to $$y=x^3+2x+1 \tag{i}$$ we get $3(0)^2+2=2 \implies 2=2$ which is an identity, meaning that it holds true for all real $x$ (which is essentially what you need for (i) to be a solution of given initial value problem or a particular solution of the differential equation satisfying given constraints). Guess what would you be getting if you had not substituted the value of $C_2$ as $2$. It would lead you to $C_2=2$ which is not an identity. That's why you first make this substitution after solving that system of equations.
A: $$y''=6x\\y'=3x^2+C_1$$
then use an initial condition:
$$y'(0)=3(0)^2+C_1=2\Rightarrow C_1=2\\y'=3x^2+2$$
then integrate again:
$$y=x^3+2x+C_2$$
initial condition again:
$$y'(0)=(0)^3+2(0)+C_2=1\Rightarrow C_2=1$$
so finally:
$$y=x^3+2x+1$$
another way would be to work out the equations first then solve using simultaneous equations (useful for boundary conditions especially):
$$y=x^3+C_1x+C_2$$
$$y(0)=C_2=1$$
$$y'(0)=C_1=2$$
$$\Rightarrow\begin{pmatrix}C_1\\C_2\end{pmatrix}=\begin{pmatrix}2\\1\end{pmatrix}$$
Although in this case it feels like overkill
