# Doubt related to formation of differential equation

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:

1. 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}

2. 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?

Really this is a point of confusion. The book is right.

In general the order of a differential equation is the number of arbitrary constants in it.

Now just look at your function the number of arbitrary constants in it is really $2$. As \begin{align*} y&=C_1\sin^2x+C_2 \cos 2x+C_3\\ &=C_1\sin^2x+C_2(1-2\sin^2x)+C_3\\ &=\sin^2x(C_1-2C_2)+(C_2+C_3)\\ &=A\sin^2x+B \end{align*} One thing more Whenever we want to know that whether our method is Correct simply we must check whether the given function is satisfying obtained differential equation or not. I Checked!! $y$ is satisfying the first differential equation you obtained and in second it should be $$y''-2\cot 2x y'=0.$$ Now Since in the second differential equation there are no arbitrary constants present so we can take it as the differential equation which characterises functions of the form $$y=C_1\sin^2x+C_2 \cos 2x+C_3$$

• Thanks! btw can you please explain the last para. I didnt quite get that. Feb 2, 2017 at 17:09
• you have got two differential equations, $y$ satisfies both. We must take that one whose order = number of arbitrary constants present in $y$
– Arun
Feb 2, 2017 at 17:13

I disagree with your book. The order of the DE must be 3. $\sin, \cos$, and $1$ are all linearly independent solutions, therefore they must be generated by a 3rd order DE.

• so the solution in 1st pic is correct? Feb 2, 2017 at 16:25
• Wait, is y supposed to be $\sin^2(x)$ as in the picture, or $\sin(2x)$ as in the question? Feb 2, 2017 at 16:28
• OH.. sorry.. its sin^2 (x) Feb 2, 2017 at 16:30
• sin^2(x) can be written in terms of cos(2x) + constant... Feb 2, 2017 at 16:33
• Exactly. Therefore the solutions presented are NOT linearly independent, and can be rewritten with only two constants. Therefore, the order is 2. Feb 2, 2017 at 16:59

The book is right that the order of a differential equation given its solution is the number of undetermined constants... except for a constant term. Why?

The differential equation this solution comes from is $y'' + 4y = -C_3$. Solving yields a family of solutions $y = A \cos 2x + B \sin 2x + C_3$, with parameters $A$ and $B$ dependent on the initial conditions. We only count these parameters - not the constant $C_3$, that comes from solving the inhomogeneous problem.

• "Ignore lone constants". I would not agree on that. For example $y'=(1-y)$ $y=1$ is a meaningful answer. Feb 2, 2017 at 15:57
• You're right; I think what I said holds for linear equations. Nonlinear equations are a whole different game. Feb 2, 2017 at 15:58
• If we place a constant into the solution for $y'' + 4y = 0$ then the equation is no longer satisfied. Feb 2, 2017 at 16:00
• Sorry for the trouble, there was a typo. .-. Feb 2, 2017 at 16:51