Question
Question: What is the general solution of the differential equation \(y'' + y = \cot (x)\)...
What is the general solution of the differential equation y′′+y=cot(x)
Solution
According to the question we have to find the general solution of the given expression. We should know that this is a second-order linear non-homogeneous differential equation. So we should first find the solution, yc of the homogeneous equation by comparing it with the auxiliary equation which is the quadratic equation with the coefficients of the derivatives and, then we will find the independent particular solution.
Formula used:
W\left( {{y_1},{y_2}} \right) = \left( {\begin{array}{*{20}{c}} {{y_1}}&{{y_2}} \\\ {y{'_1}}&{y{'_2}} \end{array}} \right)
Formula of the general solution:
y(x)=yc+yp
Complete answer:
As per the question, we have the differential expression
y′′+y=cot(x).
And the auxiliary equation associated with is:
m2+1=0, we know that it has pure imaginary solutions i.e.
m=±i
Thus we can say that the general solution of the homogeneous equation is
yc=e0(Acos(1x)+Bsin(1x)) , and we know the value e0=1 .
Therefore it gives us value
Acosx+Bsinx .
Now we will solve for the particular solution.
When we get two linearly independent solutions, let us say y1(x),y2(x) , then the particular solution in general of the form
is given by
yp=v1y1+v2y2, which are all functions of x .
Where the value of
v1=−∫W[y1,y2]p(x)y2dx
And the value of
v2=∫W[y1,y2]p(x)y1dx
And we can calculate the value W(y1,y2) by the formula
\left( {\begin{array}{*{20}{c}} {{y_1}}&{{y_2}} \\\ {y{'_1}}&{y{'_2}} \end{array}} \right)
We also have to find the derivative of both the values.
Here we have y1=cosx , so its derivative is
y1′=−sinx
Similarly, we have y2=sinx , so its derivative is
y2′=cosx
By substituting the values, we have
W(y1,y2)=1
Now we can form two particular solutions i.e.
v1=−∫1cotxsinxdx
We can write cotx=sinxcosx , so by substituting this we can write the expression as:
⇒−∫sinxcosxsinxdx=−∫cosx
And now we will simplify and write the derivative of the above expression:
v1=−sinx
Similarly, we will calculate another value i.e.
v2=∫1cotxcosxdx
Again we can write: cotx=sinxcosx , so by substituting this we can write the expression as:
⇒∫sinxcosxcosxdx=∫sinxcos2xdx
We can write
cos2x=1−sin2x
And we know that
sinx1=cscx .
Therefore we have
⇒∫sinx1−sin2xdx
By splitting the terms we can write:
∫sinx1−sinxsin2xdx
It gives us
∫cscx−sinxdx
And now we will solve the derivative of the above expression:
v2=−ln∣cscx+cotx∣+cosx
So we can write the particular solution:
yp=v1y1+v2y2
By substituting the values, we can write
=(−sinx)(cosx)+(cosx−ln∣cscx+cotx∣sinx
It then leads us to the general solution of the auxiliary equation i.e.
y(x)=yc+yp
By substituting the values:
Acosx+Bsinx−sinxcosx+sinxcosx−sinxln∣cscx+cotx∣
Hence it gives us the answer to the question Acosx+Bsinx−sinxln∣cscx+cotx∣ .
Note:
We should note that we have calculated
W(y1,y2) = \left( {\begin{array}{*{20}{c}} {\cos x}&{\sin x} \\\ { - \sin x}&{\cos x} \end{array}} \right) .
The above expression i.e. matrix is of the form
\left( {\begin{array}{*{20}{c}} a&b; \\\ c&d; \end{array}} \right)
This can be simplified by the formula:
a×d−b×c
By comparing from the formula here we have:
a=cosx, b=sinx, c=(−sinx), d=cosx
We will now simplify this value:
cosx(cosx)−(sinx)(−sinx)
On multiplying it gives us
⇒cos2x+sin2x=1