# If y'(x)+y(x)g'(x)=g(x)g'(x)" ; y(0)=0 ; g(0)=g(2)=0 " where " x in RR then y(2)=?

Dec 27, 2016

$y \left(2\right) = - 2$

#### Explanation:

This equation is of type

$y ' + P \left(x\right) y = Q \left(x\right)$

Making $u \left(x\right) = {\int}_{{x}_{0}}^{x} P \left(\xi\right) d \xi$ we have

$\frac{d}{\mathrm{dx}} \left({e}^{u \left(x\right)} y\right) = {e}^{u \left(x\right)} \left(y ' + P \left(x\right) y\right) = {e}^{u \left(x\right)} Q \left(x\right)$ so

$y = {e}^{- u \left(x\right)} {\int}_{{x}_{0}}^{x} {e}^{u \left(\xi\right)} Q \left(\xi\right) d \xi$

Here $P \left(x\right) = g '$ so $u \left(x\right) = g \left(x\right)$ and

y=e^(-g(x))int_(x_0)^x g(xi) d/(d xi)(e^(g(xi)))d xi =e^(-g(x))(( g(x)-1)e^(g(x))+C) or

$y = g \left(x\right) - 1 + C {e}^{- g \left(x\right)}$

Now, using the initial conditions, $y \left(0\right) = g \left(0\right) = 0$ we have

$0 = - 1 + C$ so $C = 1$ and

$y = g \left(x\right) - 1 + {e}^{- g \left(x\right)}$ and also

$y \left(2\right) = g \left(2\right) - 1 + {e}^{- g \left(2\right)} = 0$