1. ## Differential Equation help

Hi im a bit stuck on this question any help would be appreciated

solve the differential equation dy/dx + ycosx/sin x = x, subject to the initial condition y(pi/2) = 3

2. First, find your integrating factor.

cos(x)/sin(x)=cot(x)

e^(\int cot(x)dx)=sin(x)

d/dx[ysin(x)]=xsin(x)

Integrate:

ysin(x)=sin(x)-xcos(x)+C

Divide by sin(x):

y=1-xcot(x)+Ccsc(x)

Now, use your IC to find C and you're done.

3. given

dy/dx+(cosx/sinx)y=x

dy/dx+py=q
which is linear differential equation of first order
here p=cosx/sinx and q=x

Integrating factor= e^int(cosx/sinx)=e^log|sinx| = sinx

solution of the given equation is
y(sinx)=xsinx+c
since y(pi/2)=3

3(sin(pi/2))=pi/2sin(pi/2)+c
3=pi/2+c
3-pi/2=c

hence the solution is

Hi,
given

dy/dx+(cosx/sinx)y=x

dy/dx+py=q
which is linear differential equation of first order
here p=cosx/sinx and q=x

Integrating factor= e^int(cosx/sinx)=e^log|sinx| = sinx

solution of the given equation is
y(sinx)=xsinx+c
since y(pi/2)=3

3(sin(pi/2))=pi/2sin(pi/2)+c
3=pi/2+c
3-pi/2=c

hence the solution is