# y' + 3y = sin(x)

• Feb 23rd 2014, 03:40 PM
JC05
y' + 3y = sin(x)
Hi, can someone please check my work. I only have one chance to submit my answer online and I wanna be 100% sure.

$\frac{dx}{dy} + 3y = sin(x) , y(0) = 4$
$e^3 dx = e^{3x}$
$e^{3x} \frac{dx}{dy} + e^{3x}y = e^{3x}sin(x) dx$
$\int\frac{d}{dx} e^{3x}y = \int e^{3x}sin(x)$
$e^{3x}y = \frac{e^{3x}3sin(x)-cos(x)}{10} + c$
$y = \frac{3 sin(x) - cos(x)}{10}$
• Feb 23rd 2014, 03:53 PM
romsek
Re: y' + 3y = sin(x)
Quote:

Originally Posted by JC05
Hi, can someone please check my work. I only have one chance to submit my answer online and I wanna be 100% sure.

$\frac{dx}{dy} + 3y = sin(x) , y(0) = 4$
$e^3 dx = e^{3x}$
$e^{3x} \frac{dx}{dy} + e^{3x}y = e^{3x}sin(x) dx$
$\int\frac{d}{dx} e^{3x}y = \int e^{3x}sin(x)$
$e^{3x}y = \frac{e^{3x}3sin(x)-cos(x)}{10} + c$
$y = \frac{3 sin(x) - cos(x)}{10}$

this is a mess

are you solving for an integrating factor? (yes) then make it clear.

$$\mu(x)=e^{\int 3dx}=e^{3x}$$

then

$$\mu(x)\frac{dy}{dx}+\mu(x)y = \mu(x)\sin(x) \Rightarrow$$

$$e^{3x}\frac{dy}{dx}+e^{3x}y=e^{3x}\sin(x)$$

$$\frac{d}{dx}\left(e^{3x}y\right)=e^{3x}\sin(x)$$

etc.

Then, you properly introduced the integration constant C, but then lost it.

You need to include that and solve for it given your initial condition.

Rework it.
• Feb 23rd 2014, 05:08 PM
JC05
Re: y' + 3y = sin(x)
Quote:

Originally Posted by romsek
this is a mess

are you solving for an integrating factor? (yes) then make it clear.

$$\mu(x)=e^{\int 3dx}=e^{3x}$$

then

$$\mu(x)\frac{dy}{dx}+\mu(x)y = \mu(x)\sin(x) \Rightarrow$$

$$e^{3x}\frac{dy}{dx}+e^{3x}y=e^{3x}\sin(x)$$

$$\frac{d}{dx}\left(e^{3x}y\right)=e^{3x}\sin(x)$$

etc.

Then, you properly introduced the integration constant C, but then lost it.

You need to include that and solve for it given your initial condition.

Rework it.

$\int\frac{d}{dx} e^{3x}y = \int e^{3x}sin(x)$
$e^{3x} = \frac{e^{3x}(3sin(x) - cos(x)}{10} + C$
$y = \frac{e^{3x}(3sin(x) - cos(x)}{10} + e^{-3x}C$