Ordinary Differential Equation Strategy

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

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

-
Can you please explain that further? What does λ represent? – Imray 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
– James S. Cook Oct 4 '12 at 17:44

1
– James S. Cook Oct 4 '12 at 17:47
Awesome thanks! I'm reading up on it now... – Imray Oct 4 '12 at 17:59
show 2 more comments

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.

-

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.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 19, "mathjax_display_tex": 7, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9329698085784912, "perplexity_flag": "head"}