Inhomogeneous differential equations

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
11 replies · 2K views
gfd43tg
Gold Member
Messages
949
Reaction score
48

Homework Statement


Solve the following ordinary differential equations, where ##\alpha##, ##\beta##, and ##\lambda## are constants.

[tex]\frac {dy}{dx} + \beta y = 0[/tex]

[tex]\frac {dy}{dx} + \beta y + \alpha = 0[/tex]

[tex]\frac {d^2y}{dx^2} - \lambda^2 y = 0[/tex]

[tex]\frac {d^2y}{dx^2} + \lambda^2 y = 0[/tex]

[tex]\frac {d^2y}{dx^2} - \lambda^2 y + \alpha = 0[/tex]

Homework Equations


The Attempt at a Solution


It has been about two years since I've had to solve anything other than non-homogeneous, separable differential equations, so I am pretty rusty on this. I know I put 5 questions in one thread, but since this is an exercise just to make me remember some stuff I learned a couple years ago and long forgot, I am consolidating them here as to not have to post a few threads.

1.
[tex]\frac {dy}{dx} + \beta y = 0[/tex]
[tex]\int \frac {dy}{y} = \int -\beta dx[/tex]
[tex]ln |y| = -\beta x + C[/tex]
Assume y > 0
##y = e^{-\beta x + c}##
## y = Ce^{-\beta x}##

2.
[tex]\frac {dy}{dx} + \beta y + \alpha = 0[/tex]
for this one, I'm not sure since it is non-homogeneous.

3.
[tex]\frac {d^2y}{dx^2} - \lambda^2 y = 0[/tex]
For this one,
[tex]\frac {d^2y}{dx^2} = \lambda^2y[/tex]
[tex]\frac {d}{dx} \frac {dy}{dx} = \lambda^2y[/tex]
From here I have an idea but I'm unsure this is legitimate math operations. How would I go about this one? I can see some similarity with problem 1

4.
[tex]\frac {d^2y}{dx^2} + \lambda^2 y = 0[/tex]
I believe this one has some sort of known solution, although I wouldn't know how to get it
##y = Acos(\lambda x) + Bsin(\lambda x)##

5.
[tex]\frac {d^2y}{dx^2} - \lambda^2 y + \alpha = 0[/tex]
once again non-homogeneous, and 2nd order nonetheless, so not sure what to do
 
Last edited:
Physics news on Phys.org
(2) is a separable equation. It can be written as [itex]dy/dx= -\beta y- \alpha[/itex] and then
[tex]\frac{dy}{\beta y+ \alpha}= dx[/tex]
Integrate both sides.

None of (3), (4), or (5) are first order equations so none of the methods you seem to want to use will apply. They are, however, second order linear equations. Most introductory differential equations courses devote most of the time to those. Do you know what the "characteristic equation" is? Do you know how to find a "particular solution" to a linear non-homogeneous equation.
 
  • Like
Likes   Reactions: gfd43tg
@Maylis: These are all examples of constant coefficient linear differential equations, and can all be solved with the same technique. There are many online writeups about these DE's. One place to look is:
http://www.math.wisc.edu/~dummit/docs/diffeq_2_linear_differential_equations.pdf

In particular look at sections 1.3 and 1.4.
 
Last edited by a moderator:
  • Like
Likes   Reactions: gfd43tg
Thanks guys. I remember the terms characteristic equations and particular solutions, but it's just been too long for me to actually remember how to do it. I will look at that PDF. I had a feeling number with (2) that I could do what HallsOfIvy was saying

So for (2)

[tex]\int \frac{dy}{-\beta y - \alpha} = \int dx[/tex]

[tex]\frac {-1}{\beta} ln|-\beta y - \alpha | = x + C[/tex]

Assume ##-\beta y - \alpha \gt 0##.

[tex]\frac {-1}{\beta} ln(-\beta y - \alpha) = x + C[/tex]

[tex]-\beta y - \alpha = e^{-\beta x + C}[/tex]

[tex]y = \frac {\alpha + Ce^{-\beta x}}{-\beta}[/tex]
 
Last edited:
Hey LCKurtz,

Thanks a lot for the PDF, it is very helpful. However, I have a doubt, but before that I will post my solutions to the (3) and (4)
(3)
[tex]y'' - \lambda^2 y = 0[/tex]
[tex]r^2 - \lambda^2 = 0[/tex]
[tex](r + \lambda)(r - \lambda) = 0[/tex]
Solving for the roots of the characteristic equation,
##r_{1} = -\lambda## and ##r_{2} = \lambda##.

Therefore, the solution to this differential equation is
[tex]y = c_{1}e^{\lambda x}+c_{2}e^{-\lambda x}[/tex]

For (4)
[tex]y'' + \lambda^2 y = 0[/tex]
[tex]r^2 + \lambda^2 = 0[/tex]
The roots of the characteristic equation are
##r_{1} = \lambda i## and ##r_{2} = -\lambda i##.

Using Euler's formula
##e^{r_{1}x} = cos(\lambda x) + i \hspace{0.05 in} sin(\lambda x)##
##e^{r_{2}x} = cos(\lambda x) - i \hspace{0.05 in} sin(\lambda x)##

yields

[tex]y = c_{1}cos(\lambda x) + c_{2}sin(\lambda x)[/tex]

Okay, so hoping that those are right, now I look at a specific example in the PDF

[tex]y'' + 4y = 0[/tex]

Okay, first of all, is it just me or does it seem that the characteristic equation for ##y'' + 4y = 0## and ##y'' + 4 = 0## are identical? Or am I missing something. Anyways,

they go on and find ##r_{1} = 2i## and ##r_{2} = -2i##, then they say

[tex]e^{r_{1}x} = cos(2x) + i \hspace{0.05 in} sin(2x)[/tex]
[tex]e^{r_{2}x} = cos(2x) - i \hspace{0.05 in} sin(2x)[/tex]

Then conclude that the solution is
[tex]y = c_{1}cos(2x) + c_{2}sin(2x)[/tex]

Now I assume this is exactly like before, where the solution would be ##y = c_{1}e^{r_{1}x} + c_{2}e^{r_{2}x}##. But if do this,

[tex]y = c_{1}(cos(2x) + i \hspace{0.05 in} sin(2x)) + c_{2}(cos(2x) - i \hspace{0.05 in} sin(2x))[/tex]

How does that simplify to the solution given??
 
Last edited:
For (5),

[tex]y'' - \lambda^2 y + \alpha = 0[/tex]
I get
[tex]y'' - \lambda^2 y = -\alpha[/tex]
Using the result from (3), the general solution is
[tex]y_{g} = c_{1}e^{\lambda x} + c_{2}e^{-\lambda x}[/tex]

Now I have to use my brain to guess for the particular solution (undetermined coefficients), and I come up with this
##y_{p} = A##
##y'_{p} = 0##
##y''_{p} = 0##

Then plug back into the original differential equation
[tex]0 -\lambda^2 A = -\alpha[/tex]
and conclude that ##A = \frac {\alpha}{\lambda^2}##. Combining the general and particular solution, I get

[tex]y = c_{1}e^{\lambda x} + c_{2}e^{-\lambda x} + \frac {\alpha}{\lambda^2}[/tex]
 
Maylis said:
Hey LCKurtz,

Thanks a lot for the PDF, it is very helpful. However, I have a doubt, but before that I will post my solutions to the (3) and (4)
(3)
[tex]y'' - \lambda^2 y = 0[/tex]
[tex]r^2 - \lambda^2 = 0[/tex]
[tex](r + \lambda)(r - \lambda) = 0[/tex]
Solving for the roots of the characteristic equation,
##r_{1} = -\lambda## and ##r_{2} = \lambda##.

Therefore, the solution to this differential equation is
[tex]y = c_{1}e^{\lambda x}+c_{2}e^{-\lambda x}[/tex]

For (4)
[tex]y'' + \lambda^2 y = 0[/tex]
[tex]r^2 + \lambda^2 = 0[/tex]
The roots of the characteristic equation are
##r_{1} = \lambda i## and ##r_{2} = -\lambda i##.

Using Euler's formula
##e^{r_{1}x} = cos(\lambda x) + i \hspace{0.05 in} sin(\lambda x)##
##e^{r_{2}x} = cos(\lambda x) - i \hspace{0.05 in} sin(\lambda x)##

yields

[tex]y = c_{1}cos(\lambda x) + c_{2}sin(\lambda x)[/tex]

Okay, so hoping that those are right, now I look at a specific example in the PDF

[tex]y'' + 4y = 0[/tex]

Okay, first of all, is it just me or does it seem that the characteristic equation for ##y'' + 4y = 0## and ##y'' + 4 = 0## are identical? Or am I missing something. Anyways,

they go on and find ##r_{1} = 2i## and ##r_{2} = -2i##, then they say

[tex]e^{r_{1}x} = cos(2x) + i \hspace{0.05 in} sin(2x)[/tex]
[tex]e^{r_{2}x} = cos(2x) - i \hspace{0.05 in} sin(2x)[/tex]

Then conclude that the solution is
[tex]y = c_{1}cos(2x) + c_{2}sin(2x)[/tex]

Now I assume this is exactly like before, where the solution would be ##y = c_{1}e^{r_{1}x} + c_{2}e^{r_{2}x}##. But if do this,

[tex]y = c_{1}(cos(2x) + i \hspace{0.05 in} sin(2x)) + c_{2}(cos(2x) - i \hspace{0.05 in} sin(2x))[/tex]

How does that simplify to the solution given??

Let [itex]C_1 = c_1 + c_2[/itex] and [itex]C_2 = i(c_1 - c_2)[/itex]. Then [tex] c_1(\cos(2x) + i\sin(2x)) + c_2(\cos(2x) - i\sin(2x)) = C_1 \cos(2x) + C_2\sin(2x).[/tex] If you want [itex]y[/itex] to be real, then you need [itex]c_1[/itex] and [itex]c_2[/itex] to be complex conjugates, so that [itex]c_1 = A + iB[/itex] and [itex]c_2 = A - iB[/itex] for real [itex]A[/itex] and [itex]B[/itex]. Then [tex] C_1 = c_1 +c_2 = 2A \in \mathbb{R}, \\<br /> C_2 = i(c_1 - c_2) = -2B \in \mathbb{R}.[/tex]
 
  • Like
Likes   Reactions: gfd43tg
Hello pasmith,

Thanks for addressing that, it was not so obvious how they could equate the two. Are my solutions all good now? :)
 
Maylis said:
Okay, first of all, is it just me or does it seem that the characteristic equation for ##y'' + 4y = 0## and ##y'' + 4 = 0## are identical? Or am I missing something.
The first DE is homogenous. The second one isn't because you move the 4 to the other side as it doesn't contain a ##y## or its derivatives. The characteristic equation therefore turns out to be just ##r^2=0##.

Maylis said:
Using the result from (3), the general solution is
[tex]y_{g} = c_{1}e^{\lambda x} + c_{2}e^{-\lambda x}[/tex]
I wouldn't call this the general solution. It's the homogeneous solution. The general solution is the sum of the homogeneous and particular solutions.
 
Last edited:
Maylis said:
Hey LCKurtz,

Thanks a lot for the PDF, it is very helpful. However, I have a doubt, but before that I will post my solutions to the (3) and (4)
(3)
[tex]y'' - \lambda^2 y = 0[/tex]
[tex]r^2 - \lambda^2 = 0[/tex]
[tex](r + \lambda)(r - \lambda) = 0[/tex]
Solving for the roots of the characteristic equation,
##r_{1} = -\lambda## and ##r_{2} = \lambda##.

Therefore, the solution to this differential equation is
[tex]y = c_{1}e^{\lambda x}+c_{2}e^{-\lambda x}[/tex]

For (4)
[tex]y'' + \lambda^2 y = 0[/tex]
[tex]r^2 + \lambda^2 = 0[/tex]
The roots of the characteristic equation are
##r_{1} = \lambda i## and ##r_{2} = -\lambda i##.

Using Euler's formula
##e^{r_{1}x} = cos(\lambda x) + i \hspace{0.05 in} sin(\lambda x)##
##e^{r_{2}x} = cos(\lambda x) - i \hspace{0.05 in} sin(\lambda x)##

yields

[tex]y = c_{1}cos(\lambda x) + c_{2}sin(\lambda x)[/tex]

Okay, so hoping that those are right, now I look at a specific example in the PDF

[tex]y'' + 4y = 0[/tex]

Okay, first of all, is it just me or does it seem that the characteristic equation for ##y'' + 4y = 0## and ##y'' + 4 = 0## are identical? Or am I missing something.

##y''+4=0## is the same as ##y''=-4## and is a nonhomogeneous equation. The characteristic equation is ##r^2=0## giving ##y_c = Ax + B## for the homogeneous equation. Then you look for a particular solution for the NH equation (easy by inspection).

Anyways,

they go on and find ##r_{1} = 2i## and ##r_{2} = -2i##, then they say

[tex]e^{r_{1}x} = cos(2x) + i \hspace{0.05 in} sin(2x)[/tex]
[tex]e^{r_{2}x} = cos(2x) - i \hspace{0.05 in} sin(2x)[/tex]

Then conclude that the solution is
[tex]y = c_{1}cos(2x) + c_{2}sin(2x)[/tex]

Now I assume this is exactly like before, where the solution would be ##y = c_{1}e^{r_{1}x} + c_{2}e^{r_{2}x}##. But if do this,

[tex]y = c_{1}(cos(2x) + i \hspace{0.05 in} sin(2x)) + c_{2}(cos(2x) - i \hspace{0.05 in} sin(2x))[/tex]

How does that simplify to the solution given??

I think someone else already answered that. Also, in the case of distinct real roots, you may sometimes see the function pair ##\{\cosh(\lambda x),\sinh(\lambda x)\}## used instead of ##\{e^{\lambda x},e^{-\lambda x}\}##.
 
Last edited:
  • Like
Likes   Reactions: gfd43tg
Hello Vela,

I guess I should have used a different word (i.e. I moved alpha over) if you see the end of post #6, it is clear what my solution is. I believe you mistook that as my solution just doing one step of algebra