In order to solve this inhomogeneous differential equation you
need to start by solving the homogeneous case first (aka when the
right hand side is just 0).
The characteristic equation for this differential equation is
r²+1=0 or r²=-1 which means that r must be equal to ±i. Therefore,
the general solution to this homogeneous problem Is
y=c1*sin(x)+c2*cos(x) where c1 and c2 are constants determined by
the initial conditions.
In order to solve the inhomogeneous problem we need to first
find the Wronskian of our two solutions.
_________|y1(x) y2(x) | __| sin(x) cos(x) |
W(y1, y2)= |y1'(x) y2'(x) | = | cos(x) -sin(x) | =
-sin(x)²-cos(x)²= -1
Next, we calculate the particular solution
Y(x)=-sin(x)* Integral(-1*cos(x)*cot(x)) +
cos(x)*Integral(-1*sin(x)*cot(x))
=sin(x)*Integral(cos²(x)/sin(x)) - cos*Integral(cos(x))
=sin(x)*(ln(tan(x/2)) + cos(x))
-cos(x)*sin(x)=sin(x)*ln(tan(x/2))
Finally, to answer the entire equation, we add the particular
solution to the homogeneous solution to get
y(x)=sin(x)*ln(tan(x/2)) + c1*sin(x)+c2*cos(x)