# Thread: find particular solution for first order linear DE

1. ## find particular solution for first order linear DE

(1+x)y' + y = cos(x).... y(0) = 1

So far, I have:
P(x) = 1/(1+x)
Q(x) = cos(x)/(1+x)
p(x) = e^int(P(x))dx = e^int(1/1+x)dx = e^(ln(1+x))
... I think I did the integral wrong. It's been half a year, my integration skills need to worked on. But this homework is due in an hour and if somebody could real quickly guide me thru it and then I can work thru this section on my own when I don't have pressure to turn homework in... I would really appreciate it!

Once I have p(x), I multiply both sides of DE by it.
Then I'm supposed to "recognize" that left side is a derivative, so taking integral of both sides just means taking integral of right side.

Once I do that, I'll have a C, so is that when I plug in the initial condition?
And then once I get C and substitue that number in, that's my particular solution?

Thanks!

2. You have gotten the DE to the point where

$\frac{dy}{dx} + \left(\frac{1}{1 + x}\right)y = \frac{\cos{x}}{1 + x}$

and so the integrating factor is $e^{\int{\frac{1}{1 + x}\,dx}} = e^{\ln{(1 + x)}} = 1 + x$.

Multiplying through by the integrating factor gives

$(1 + x)\frac{dy}{dx} + y = \cos{x}$

$\frac{d}{dx}[(1 + x)y] = \cos{x}$

$(1 + x)y = \int{\cos{x}\,dx}$

$(1 + x)y = \sin{x} + C$

$y = \frac{\sin{x} + C}{1 + x}$.

Plugging in the initial condition $y(0) = 1$ gives

$1 = \frac{\sin{0} + C}{1 + 0}$

$1 = \frac{0 + C}{1}$

$1 = C$.

Therefore $y = \frac{\sin{x} + 1}{1 + x}$.