# How to solve the DE $y' = -y + ty^{1/2}$?

The DE is $y' = -y + ty^{\frac{1}{2}}$.

$2 \le t \le 3$

$y(2) = 2$

I tried to see if it was in the linear form. I got:

$$\frac{dy}{dt} + y = ty^{\frac{1}{2}}$$

The RHS was not a function of t. I also tried separation of variables, but I couldn't isolate the y from the term $ty^{\frac{1}{2}}$. Any hints?

Set $y=z^2$ and simplify. You get $y'=2zz'$ and your equation is $2zz'+z^2=tz$ or $2z'+z=t$ which is linear and you can apply integrating factor to it.

(We assumed $y>0$, which it is near initial point.)

Let $y=u^2$, then you can cancel a factor of $u$ and get

$$2 u' + u = t$$

for which you can apply an integrating factor of $e^{t/2}$ to both sides and get

$$\frac{d}{dt} [u e^{t/2}] = \frac{t}{2} e^{t/2}$$

Integrating both sides, we get the general solution:

$$u(t) = t-2 + C e^{-t/2}$$

where $C$ is a constant of integration. The solution is then $y(t)=u(t)^2$.

I'll just add that integration factor is not necessary. From the equations $$2z'+z = t$$ you can assume that particular solution is linear $z^p = At+B$ and substitute it to ODE $$2A+At+B=t$$ from which you can easily find that $A = 1, B = -2$, so $z^p = t - 2$. General solution of inhomogeneous problem is a sum of general solution of homogeneous problem and particular solution of inhomogeneous problem. Homogeneous one can be easily solved and $z_0 = C^{-\frac 12t}$, so $z = t-2+C^{-\frac 12 t}$

If that $y^{\frac12}$ weren't there, you might solve the problem by multiplying by an integrating factor of $e^t$ to yield $(e^ty)'$ on the left side. Try making the substitution

$$z=e^ty$$ $$y^{\frac12}=z^{\frac12}e^{-\frac t2}$$ $$e^ty'+e^ty=(e^ty)'=te^ty^{\frac12}$$ $$z'=te^t(z^{\frac12}e^{-\frac t2})=te^{\frac t2}z^{\frac12}$$

This equation is now separable.

Hint:

Another approach applying here is to see that your OD is a [Bernoulli] (http://en.wikipedia.org/wiki/Bernoulli_differential_equation) equation. Just to see that $n=1/2$. The substitution $w=y^{1-1/2}=\sqrt{y}$ works.