Question:
Find the order of the differential equation of $$y=C_1\sin^2x+C_2\cos 2x+C_3$$
I read in my book that the order of the differential equation is equal to the number of arbitrary constants but the answer given is $2$.
Attempt: Here are two methods I tried:
I calculated up to 3rd differential and obtained a differential equation.
$$\begin{align} y&=C_1\sin^2x+C_2\cos2x+C_3\\ y'&=C_1\sin2x-2C_2\sin2x\\ y''&=2C_1\cos2x-4C_2\cos2x\\ y'''&=-4C_1\sin2x+8C_2\sin2x\\ &=-4(C_1\sin2x-2C_2\sin2x)\\ &=-4y' \end{align}$$
I differentiated both sides w.r.t. $x$ and then sent the $\sin2x$ term, which I was getting in RHS, to LHS and wrote $\frac1{\sin2x}$ as $\operatorname{cosec}2x$. Then I differentiated both sides again w.r.t. $x$. In this way, both $C_1$ and $C_2$ which remained after calculating 1st derivative become zero.
$$\begin{align} y&=C_1\sin^2x+C_2\cos2x+C_3\\ y'&=C_1\sin2x-2C_2\sin2x\\ \operatorname{cosec}2xy'&=C_1-2C_2\\ 2\operatorname{cosec}2x\cot2xy'+\operatorname{cosec}2xy''&=0\\ \implies2\cot2xy'+y''&=0 \end{align}$$
Which one is the correct method? If it's neither, what's the right method?