# Differential Equation computing solution

## Homework Statement

Compute the general solution of y'' + 4y' + 20y =e-2tsin4t

## The Attempt at a Solution

after using determinants, I found the $$\lambda_1 = -2 + 4i$$ and $$\lambda_2 = -2 - 4i$$

So the general solution would be y(t) = k1e-2tcos4t + k2e-2tsin4t + yim

to find yim, would I make it equal to Ae-2te4it, find first and second derivative, and plug them in the original equation and then apply euler's method?

Related Calculus and Beyond Homework Help News on Phys.org
Mark44
Mentor

## Homework Statement

Compute the general solution of y'' + 4y' + 20y =e-2tsin4t

## The Attempt at a Solution

after using determinants, I found the $$\lambda_1 = -2 + 4i$$ and $$\lambda_2 = -2 - 4i$$

So the general solution would be y(t) = k1e-2tcos4t + k2e-2tsin4t + yim

to find yim, would I make it equal to Ae-2te4it, find first and second derivative, and plug them in the original equation and then apply euler's method?
No.
You have found the solutions to the homogeneous problem y'' + 4y' + 20y = 0, which can also be written as (D2 + 4D + 20)y = 0, where the thing in parentheses is an operator that is a linear combination of derivatives.

What you're calling yim I would prefer to call yp, a particular solution to the nonhomogeneous problem (D2 + 4D + 20)y = e-2tsin4t.

The problem with the function you suggest for yp is that it's a solution to the homogeneous problem. That is, (D2 + 4D + 20)Ae-2tsin4t = 0, so it can't also be a solution to your nonhomogeneous problem. Same is true for Be-2tcos4t.

What will work for a particular solution to the nonhomogeneous problem is Cte-2tsin4t + Dte-2tcos4t. If you apply the operator (D2 + 4D + 20) to this function, you should be able to solve for the values of C and D to end up with 1 for the coefficient of e-2tsin4t and 0 for the coefficient of e-2tcos4t.

The business of looking at (D2 + 4D + 20) as an operator is tied to the idea of "annihilators" that is used in some DE texts. This idea is used in the context of linear, constant coefficient, nonhomogeneous DEs, and the idea is to figure out from a given nonhomogeneous DE of a certain order, how you can turn it into a homogeneous DE of a higher order.

For a simple example, consider y' - y = 0, or (D - 1)y = 0. The D - 1 operator looks a lot like the characteristic equation for this simple DE, and this is no accident. The general solution is y = Ae1t, with the 1 added for emphasis.

Now consider y' - y = 2et, or (D - 1)y = 2et. No multiple of et could possibly be a particular solution of this equation, because the operator D - 1 produces 0.

If we apply the same operator, D - 1, to both sides, we get (D - 1)2y = (D - 1)2et = 0.

So now the characteristic equation (r - 1)2 = 0 has a repeated root, and this means that the solutions to the DE will be some linear combination of et and tet.

Going back to the original example, yh is Aet and yp is ktet. Together these make up the general solution to the original example.

I hope you followed my explanation, which is the same thing I was doing in working your problem. What I did was complicated enough that I thought it deserved seeing the process at work on a simpler example.
Mark

By "apply the operator (D2 + 4D + 20) to this function", did you mean this:

(D2 + 4D + 20)y = Cte-2tsin4t + Dte-2tcos4t ?

IIf you did, I'm not sure what to do next. Neither my textbook nor my proffesor ever talked about this. It was always finding first and second derivative, plug it in the original equation, and then solve for C and D.

Mark44
Mentor
Not quite. Your original DE can be written as
(D2 + 4D + 20)y = e-2tsin4t

If you apply the D2 + 4D + 20 operator again, you will have
(D2 + 4D + 20)2y = (D2 + 4D + 20)e-2tsin4t = 0, a fourth-order, linear, constant coefficient, homogeneous DE.

The operator (D2 + 4D + 20)2 corresponds to the characteristic equation (r2 + 4r + 20)2 = 0, which has repeated complex roots -2 +/- 4i. Two functions that are solutions to your original DE are e-2tsin4t and e-2tcos4t. Another pair that are closely related to the first pair are e-2te-4it and e-2te4it. The presence of -2 and +/- 4i is not accidental.

What I was trying to get across in my previous post is what to do when you have a characteristic equation with repeated roots, and in a nutshell, that is to add a factor of t.

Some more examples:

Operator | Solution(s)
D | e0t = 1
D2 | e0t, te0t (= 1, t)
D - 1 | et
(D - 1)2 | et, tet
(D - 1)3 | et, tet, t2tet
D2 + 4D + 20 | e-2tsin4t, e-2tcos4t
(D2 + 4D + 20)2 | e-2tsin4t, e-2tcos4t, te-2tsin4t, te-2tcos4t

Is that any clearer? I have covered a lot of ideas in not many words, so I can understand it if you have trouble comprehending what I'm saying.

Last edited:
So this is what you were saying (unless I'm mistaken):

yp = ktet => kte-2tsin4t + kte-2tcos4t

and yh = Ae-2t

yh'' + 4yh' + 20yh =e-2t

Mark44
Mentor
So this is what you were saying (unless I'm mistaken):

yp = ktet => kte-2tsin4t + kte-2tcos4t

and yh = Ae-2t

yh'' + 4yh' + 20yh =e-2t
Not quite, so I'm afraid I wasn't very clear. For your problem,
yp = k1te-2tsin4t + k2te-2tcos4t (*)

and yh = Ae-2tsin4t + Be-2tcos4t

yh'' + 4yh' + 20yh = 0
yp'' + 4yp' + 20yp = e-2tsin4t

Substitute yp (marked with *) into the equation just above, and solve for the coefficients k1 and k2.

I could be mistaken, but shouldnt it be the other way around:

yh'' + 4yh' + 20yh = e-2tsin4t
yp'' + 4yp' + 20yp = 0

Cyosis
Homework Helper
No, the homogeneous problem is $y^{''} + 4y^{'} + 20y=0$. So you can write the solutions to this problem as $y_h$.

I think I figured out what Mark was talking about. When I tried to use yh = Ae-2tsin4t + Be-2tcos4t, I did in fact get 0, which does not eqaul e-2tcos4t, and that's why I need to use yp = k1e-2tsin4t + k2e-2tcos4t

Can't believe I didn't get that earlier.

Mark44
Mentor
And that's the reason I labeled the two different solutions as I did, yh and yp. yh is the solution to the homogeneous problem, which you can write in shorthand as (D2 + 4D + 20)y = 0. The operator D2 + 4D + 20 maps any linear combination of e-2tcos4t and e-2tsin4t to 0. This means that if you want to find a function that the same operator maps to e-2tsin4t, your solution can't be any of the functions represented by yh. That's where the t multiplier comes in.

Last edited:
There's another part of the question that says "Discuss the long term behavious of solutions of this equation". Would I just take the limit of the general solution as t approaches infinity?

Mark44
Mentor
Yep.

It this the general solution (or something at least close to it)?

y(t) = k1e-2tcos4t + k2e-2tsin4t + (1/8)cos4t

Mark44
Mentor
Part of it is, and part isn't. The first two terms are yh, and they're OK. The last term is not. Review your work for yp. It should be something like Cte-2tcos4t, where C is a specific number that you already found. Maybe that's the 1/8 that you showed.

I just got a question. My book talks about a different method that can be applied when you have a complex root.

For example:

y'' +2y' + 2y = sint. The roots are -1+/- i

to find yp, it lets y'' +2y' + 2y = eit. yc = aeit

a = $$\frac{1}{1+2i} = \frac{1 - 2i}{5}$$

yc(t) = $$\frac{1 - 2i}{5} (cost + i sint)$$

and yp is the imaginery part of yc(t) .

Was it possible to do the question that way?

Mark44
Mentor
I don't think so, but I'm not sure. The difference between this problem and the first one is that in this one, the roots of the characteristic equation (r = -1 +/- i) are different from the roots of the characteristic equation of the DE with sint as a solution (i.e., y'' + y = 0, with characteristic equation r2 + 1 = 0). In the other problem, the function on the right side of the nonhomogeneous equation is the same as the solutions of the homogeneous problem. This makes it necessary to come up with a different function, which is the reason for the "t" multiplier.

Mark44
Mentor
There's a direct connection between the roots of the characteristic equation for a linear, homogeneous DE and its solutions. Here's a brief summary for the case of a 2nd order homogeneous DE.

Real roots (distinct): r1 $\neq$ r2 --- er1t, er2t
Real roots (repeated): r1 = r2 --- er1t, ter1t
Pure imaginary roots: r = +/- bi --- eibt, e-ibt OR cos(bt), sin(bt)
Complex roots: r = a +/- bi --- eateibt, eate-ibt OR eatcos(bt), eatsin(bt)

What I said earlier in this thread about annihilators is a technique that can be used to turn a lower-order nonhomogeneous DE into a higher-order homogeneous DE. You then get the characteristic equation of the higher-order homogeneous DE and factor it, and from the factors, you pretty much read off the solutions. The thing to remember is which factors come from the related lower-order homogeneous DE. The other factors make up the particular solution of the original lower-order nonhomogeneous DE.

That makes sense.