How do you solve #y'=-xy+sqrty# given #y(0)=0#?

1 Answer
Apr 1, 2018

#y=y(0)=1/4pie^(-1/2x^2)"erfi"^2(1/2x)#

Explanation:

We have #y'=-xy+sqrty# or #dy/dx=y^(1/2)-xy#.

Let #v=y^(1/2)# and #(dv)/dx=1/2y^(-1/2)dy/dx#

Now

#y^(-1/2)dy/dx=1-xy^(1/2)=1-vx#

so

#(dv)/dx=1/2(1-vx)=1/2-1/2vx#

#rArr(dv)/dx+1/2vx=1/2#

This is now a linear first-order ordinary differential equation of the form

#(dv)/(dx)+vP(x)=Q(x)#

We solve this using an integrating factor:

#mu=e^(int1/2xdx)=e^(1/4x^2)#

So the general solution is

#ve^(1/4x^2)=int1/2e^(1/4x^2)dx=1/2(sqrtpi "erfi"(1/2x)+"c")#

Solving for #v#

#v=1/2e^(-1/4x^2)(sqrtpi"erfi"(1/2x)+"c")#

But #v=sqrty# so

#sqrty=1/2e^(-1/4x^2)(sqrtpi"erfi"(1/2x)+"c")#

and

#y=1/4e^(-1/2x^2)(sqrtpi"erfi"(1/2x)+"c")^2#

Now, we have the condition #y(0)=0#

So

#y(0)=1/4e^0(sqrtpi"erfi"(0/2)+"c")^2=0#

#rArr1/4c^2=0rArrc=0#

So the final solution is

#y=y(0)=1/4pie^(-1/2x^2)"erfi"^2(1/2x)#