# Thread: differential equation, solution check

1. ## differential equation, solution check

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

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

$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
$y^{'}(t)+y(t)=sint$
$y(0)=0$
$y^{'}e^x+ye^x=e^xsint$

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

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

With your solution I get $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