Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In one of the examples in the Differential Equations for Dummies Workbook (Holzner), you are asked to use an integrating factor to solve $$ \frac{dy}{dx} +2y =4 $$

My question is, is this the most efficient way to solve it? Can't I also solve it by separating the $y$, turning the equation into $\frac{1}{2-y}\frac{dy}{dx} = 2$. Are there other ways? How do you quickly determine what will be the quickest way?

share|cite|improve this question
up vote 5 down vote accepted

The quickest way to solve this is to note $\lambda+2=0$ gives $\lambda=-2$ hence $y_h = e^{-2x}$ and eyeballin-it shows $y_p = 2$ hence $y = c_1e^{-2x}+2$.

share|cite|improve this answer
Can you please explain that further? What does λ represent? – CodyBugstein Oct 4 '12 at 17:36
Sure, when we solve a constant coefficient ode we can solve it by looking at the characteristic equation. For example, $y''-y=0$ gives $\lambda^2-1=0$ hence $\lambda = \pm 1$ which tells me $y = c_1e^t+c_2e^{-t}$. Perhaps you will study this soon in your course. The other part $y_p$ is called the particular solution. If you haven't studied these yet then separation of variables is probably better, or the integrating factor method for more complicated linear odes. – James S. Cook Oct 4 '12 at 17:41
I just found maybe these help explain without me reinventing the wheel here... – James S. Cook Oct 4 '12 at 17:44
Or,… also seems relevant. Usually people don't emphasize the utility of the method for the first order ODEs, but it applies for the constant coefficient case $ay'+by=g$ but finding $y_p$ to produce $g$ is tough in general (well, it's an integral). – James S. Cook Oct 4 '12 at 17:47
Awesome thanks! I'm reading up on it now... – CodyBugstein Oct 4 '12 at 17:59

Another to solve it would be to use the characterstic equation which is what the above answer used:

z^2 + 2z - 4 = 0.

You can factor this equation and the general solution is would by using the general formula provided in any ODE text.

However, integrating factors do not require you to remember a formula and in most situations this technique is more elegant and quick.

share|cite|improve this answer
That characteristic equation is wrong... – Hans Lundmark Oct 21 '12 at 11:16

You can separate variables, thus: $$ \frac{dy}{dx} = 4-2y $$ $$ \frac{dy}{2-y} = 2\,dx $$ $$ -\log|2-y| = 2x+\text{constant} $$ $$ |2-y|=e^{-2x-\text{constant}} = (e^{-2x}\cdot(\text{positive constant})) $$ $$ 2-y = e^{-2x}\cdot\text{constant} $$ $$ y = 2-(e^{-2x}\cdot\text{constant}) $$

As for integrating factors, notice that you have $y'+2y$ and after multiplying by some factor---call it $w$---you have $wy'+(2w)y$ and you want $wy'+w'y$, so that it becomes $(wy)'$. So you need $w'=2w$. That's a differential equation, one of whose solutions is $w=e^{2x}$. And you only need one of its solutions.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.