Question #c4abb

2 Answers
Jan 3, 2018

#y(x) = sinx/x-cosx#

Explanation:

Start by solving the homogeneous equation:

#xdy/dx+y =0#

For #x!=0# the equation is separable and we have:

#dy/dx =-y/x#

#dy/y = -dx/x#

#lnabsy = -lnabsx+c#

#y=-C/x#

We can now look for a particular solution in the form:

#bary(x) = -C/xv(x)#

#(dbary)/dx = C/x^2v(x) - C/xv'(x)#

Substituting in the original equation:

#x(dbary)/dx +bary = xsinx#

#C/xv(x) -Cv'(x) - C/xv(x) = xsinx#

#v'(x) = - x/Csinx#

#v(x) = -1/C int xsinxdx#

Integrating by parts:

#v(x) = 1/Cxcosx -1/C int cosxdx#

#v(x) = 1/Cxcosx -1/C sinx +C_1#

and so:

#bary(x) = -C/x v(x) = -cosx +sinx/x-(C C_1)/x#

The general solution is then:

#y(x) =-C/x-cosx+sinx/x#

and posing #y(pi) = 1# we can determine the constant:

#1= -C/pi -cospi + sin pi/pi #

#1= -C/pi +1 #

so #C=0#

Finally:

#y(x) = sinx/x-cosx#

Jan 3, 2018

y=#-#cosx+#sinx/x#

Explanation:

x#dy/dy#+y=xsinx
#dy/dy#+#y/x#=#sinx#

integrating factor,
=#inte^(1/x)#dx =x

yx=#intsinx.xdx#

integration by parts,
#intsinx.xdx#=-xcosx+sinx+C

therefore,
xy=-xcosx+sinx+C

y(#pi#)=1 #rArr#when x= #pi#, y=1

#pi# =-#pi#cos#pi#+sin#pi#+C

c=0

therefore,

xy=-xcosx+sinx
or
y=#-cosx#+#sinx/x#