# Thread: differential equation, solution check

1. ## differential equation, solution check

can someone take a look at this
$\displaystyle y^{'}(t)+y(t)=sint$
$\displaystyle y(0)=0$
$\displaystyle y^{'}e^x+ye^x=e^xsint$

$\displaystyle \int y^{'}e^x=\int e^xsintdx$
$\displaystyle ye^x=\frac{e^x}{2}(sinx-cosx)+C$
$\displaystyle y=\frac{1}{2}(sinx-cosx)+Ce^{-x}$
$\displaystyle 0=\frac{1}{2}(0-1)+C$
$\displaystyle C=\frac{1}{2}$

$\displaystyle y=\frac{1}{2}(sinx-cosx)+\frac{1}{2}e^{-x}$
oh yes it was a stupid mistake I have corrected it thank you

2. Originally Posted by rayman
can someone take a look at this
$\displaystyle y^{'}(t)+y(t)=sint$
$\displaystyle y(0)=0$
$\displaystyle y^{'}e^x+ye^x=e^xsint$

$\displaystyle \int y^{'}e^x=\int e^xsintdx$
$\displaystyle ye^x=\frac{e^x}{2}(sinx-cosx)+C$
$\displaystyle y=\frac{1}{2}(sinx-cosx)+Ce^{-x}$
$\displaystyle 0=\frac{1}{2}(0-1)+C$
$\displaystyle C=\frac{3}{2}$

$\displaystyle y=\frac{1}{2}(sinx-cosx)+\frac{3}{2}e^{-x}$

With your solution I get $\displaystyle y(0)=-\frac{1}{2}+\frac{3}{2}=1\neq 0$ ...

The mistake is a rather minor one and it is in the one before last line, the value of C.

Tonio