1
$\begingroup$

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?

3 Answers 3

5

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$.

  • 0
    Can you please explain that further? What does λ represent?2012-10-04
  • 0
    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.2012-10-04
  • 0
    I just found http://math.stackexchange.com/questions/30812/second-order-des maybe these help explain without me reinventing the wheel here...2012-10-04
  • 1
    Or, http://math.stackexchange.com/questions/161421/why-are-the-solutions-to-second-order-differential-equations-summed 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).2012-10-04
  • 0
    Awesome thanks! I'm reading up on it now...2012-10-04
  • 0
    @JamesS.Cook : You're using the letter $t$ where the original poster used $x$.2012-10-04
  • 0
    @MichaelHardy thanks for the comment, fixed it.2012-10-05
0

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.

  • 0
    That characteristic equation is wrong...2012-10-21
0

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.