# Thread: How do I solve this linear equation?

1. ## How do I solve this linear equation?

How do I solve this linear equation?

y'+2ytan(x)=sin(x)

The answer can be found here: y'+2ytan(x)=sin(x) - Wolfram|Alpha

But I would be really greatful if someone could explain the steps involved.

2. Originally Posted by jobloggs
How do I solve this linear equation?

y'+2ytan(x)=sin(x)

The answer can be found here: y'+2ytan(x)=sin(x) - Wolfram|Alpha

But I would be really greatful if someone could explain the steps involved.

first thing you need to do is find you integrating factor which will be

$2\tan{x}$

Next

$e^{\int{2\tan{x}}}dx = e^{-2\ln{\cos{x}}} = e^{\ln{\cos^{-2}{x}}} = \cos^{-2}{x} = \sec^2{x}$

so now

$y\sec^2{x} = \int \sin{x}\sec^2{x}dx = \int\sec{x}\tan{x}$

integrate that and you get

$y\sec^2{x} = \sec{x} + C$

divide by $\sec^2{x}$ and get

$y = \cos{x} +C\cos^2{x}$