Main content

## Differential equations

### Course: Differential equations > Unit 2

Lesson 2: Complex and repeated roots of characteristic equation# Complex roots of the characteristic equations 3

Lets do an example with initial conditions! Created by Sal Khan.

## Want to join the conversation?

- I enjoy Sal's videos on differential equations, they are as fun as solving puzzles, but I have a question: Are these instructions for solving differential equations are helpful at all aside from solving an equation for the sake of itself? If a computer can solve these equations, wouldn't it be better for me to just learn how to use differential equations for constructing models?(7 votes)
- There are myriad reasons to learn how to solve differential equations by hand.

First, differential equations appear all over science and engineering. If you want to be able to understand an argument or explanation in, say, mechanics (falling objects, oscillations, and pretty much everything else) quantum mechanics (most of these courses start with the Schrodinger wave equation, which involves solving partial differential equations and is prerequisite for any further understanding of the subject) or fluid dynamics and rheology, you're going to have a very hard time picking up even the basics if you have to turn to a computer to do your work for you, and you'll certainly have lots of trouble communicating yourself and understanding what problems are asking if you don't have grounding in this subject, which is assumed in most physics/engineering/biological/chemical curricula beyond the most elementary levels.

Secondly, if you don't have a basic knowledge of how these equations work, so many subjects will just be a black box. It would be like not knowing how to add or multiply because you can just type those things into a calculator. You'll be at a major disadvantage compared to your peers who have learned the subject, and relationships they pick out easily will remain an elusive mystery to you. Knowledge is certainly power. And skill is also power.

Of course, most differential equations actually encountered in the course of doing actual science will require the use of a computer. But that is another matter. Proper and efficient modelling of particular physical or biological systems is something you learn as you come to it. And those skills will assume a standard knowledge of vocabulary, concepts, and the ability to apply them, without which you will always be at a loss for understanding.(21 votes)

- i cant understand...why there is no complex number in solution??/plz help me...which number cancel out "i"??(2 votes)
- i is just a constant, and so it was simply absorbed into c1 and c2.(4 votes)

- Can it happen that I am given two sets of initial conditions, such that they make no sense?, that they can't both be true?, I tried making them but so far I have not been succesful(2 votes)
- do you mean a set of initial conditions that are mutually exclusive of each other? or just a set of initial conditions that cant be true.(4 votes)

- at3:29we found two roots. r= -2+i and r=-2-i why we choose u=1 instead of u=-1?(2 votes)
- It doesn't make a difference, since both constants are arbitrary.

C1 cos -x = C1 cos x, and

C2 sin -x = -C2 sin x. You can just use C2 instead of -C2, since it's arbitrary.(4 votes)

- how will i solve this

D^4 - 5D^2 + 12D + 28=0

find the complex root of this(3 votes)- You need to do some trick here to solve it, you need to bring in cubes.

D^4 - 5D^2 + 12D + 28=0

=>D^4 +2D^3 - 2D^3 - 4D^2 -D^2 -2D + 14D + 28 = 0

=>D^3(D+2) - 2*D^2(D+2) - D(D+2) + 14(D+2) = 0

=>(D+2)(D^3 - 2*D^2 -D +14) = 0

Now, we can find one value of D which is -2; and need to solve the cubic equation now.

(D^3 - 2*D^2 -D +14) =0

D^3 +2*D^2 -4*D^2 -8D +7D +14 = 0

=> (D+2)(D^2-4D+7)=0 [Skipping some intermediate steps]

So we get, D=-2 (Repeated, D^3 term was '0' in the original equation)

D^2-4D+7=0

Solving this, we will get complex roots since (b^2-4ac)<0,

D = -2, 2+i*sqrt(3), 2-i*sqrt(3) are three roots.

One question may come like why there are three roots but the power of the original expression is 4? Obviously, because there is no CUBIC term in the original expression. We can also say the Algebraic Multiplicity of (-2) is TWO since it is repeated two times.(2 votes)

- Is it possible to have a quadratic equation that has a max value with no real roots(2 votes)
- Do we need to solve for C2 by using the initial condition of the first derivative in this instance only b/c sin(0) becomes 0 and cancels C2, or does this apply for all?(2 votes)
- What if we had a nonhomogeneous differential equation and got complex roots?(1 vote)
- Step 1: Find the general solution to the
*homogeneous*differential equation.

Step 2: Find a particular solution (to the*nonhomogeneous*differential equation).

Step 3: Add the general solution to the particular solution. This yields the general solution of the*nonhomogeneous*differential equation.

For more details, start here: https://www.khanacademy.org/math/differential-equations/second-order-differential-equations/undetermined-coefficients/v/undetermined-coefficients-1(1 vote)

- In place of c2 wont it be ic2?(1 vote)
- Both are same since it's an ARBITRARY Constant.(1 vote)

- can you plz suggest me where i could get the videos for geometry of complex no.s ??(1 vote)
- Have you looked in Sal's complex numbers sections/videos? you will likely find them there:) I always had trouble with complex numbers until a teacher (recently) reminded me that sqrt(-4) is just sqrt(4) * -1, where the -1=i. I haven't had any trouble since.(1 vote)

## Video transcript

Let's do a couple of problems
where the roots of the characteristic equation
are complex. And just as a little bit of a
review, and we'll put this up here in the corner so that
it's useful for us. We learned that if the roots of
our characteristic equation are r is equal to lambda plus
or minus mu i, that the general solution for our
differential equation is y is equal to e to the lambda x times
c1 with some constant cosine of mu x, plus c2
times sine of mu x. And with that said, let's
do some problems. So let's see, this first one
that our differential equation-- I'll do this one
in blue-- our differential equation is the second
derivative, y prime prime plus 4y prime plus 5y
is equal to 0. And they actually give us
some initial conditions. They say y of 0 is equal
to 1, and y prime of 0 is equal to 0. So now we'll actually be able
to figure out a particular solution, or the particular
solution, for this differential equation. So let's write down the
characteristic equation. So it's r squared plus 4r
plus 5 is equal to 0. Let's break out our
quadratic formula. The roots of this are going
to be negative b. So minus 4 plus or minus the
square root of b squared. So that's 16. Minus 4 times a-- well that's
1-- times 1, times c times 5. All of that over 2 times a. a is 1 so all of that over 2. And see this simplifies. This equals minus 4 plus or
minus 16-- this is 20, right? 4 times 1 times 5 is 20. So 16 minus 20 is minus 4. Minus 4 over 2. And that equals minus 4 plus
or minus 2i, right? Square root of minus 4 is 2i. All that over 2. And so our roots to the
characteristic equation are minus 2-- just dividing both by
2-- minus 2 plus or minus, we could say i or 1i, right? So if we wanted to do some
pattern match, if we just wanted to do it really fast,
what's our lambda? Our lambda is just minus 1. Let me write that down. That's our lambda. What's our mu? Well mu is the coefficient
on the i, so mu is 1. mu is equal to 1. And now we're ready to write
down our general solution. So the general solution to this
differential equation is y is equal to e to the lambda
x-- well lambda is minus 2-- minus 2x times c1 cosine of mu
x-- but mu is just 1-- so c1 cosine of x, plus c2 sine
of mu x, when mu is 1, so sine of x. Fair enough. Now let's use our initial
conditions to find the particular solution, or
a particular solution. So, when x is 0, y
is equal to 1. So y is equal to
1 when x is 0. So 1 is equal to-- let's
substitute x is 0 here. So e to the minus 2 times
0, that's just 1. So this whole thing becomes 1,
so we could just ignore it. It's just 1 times this thing. So I'll write that down. e to the 0 is 1 times c1 times
cosine of 0, plus c2 times sine of 0. Now what's sine of 0? Sine of 0 is 0. So this whole term
is going to be 0. Cosine of 0 is 1. So there, we already
solved for c1. We get this, this is 1. So 1 times c1 times
1 is equal to 1. So we get our first
coefficient. c1 is equal to 1. Now let's take the derivative
of our general solution. And we could even substitute
c1 in here, just so that we have to stop writing
c1 all the time. And we can solve for c2. So right now we know that our
general solution is y-- we could call this our
pseudo-general solution, because we already solved for
c1-- y is equal to e to the minus 2x times c1, but we know
that c1 is 1, so I'll write times cosine of x, plus
c2 times sine of x. Now let's take the derivative
of this, so that we can use the second initial condition. So y prime is equal to-- we're
going to have to do a little bit of product rule here. So what's the derivative of
the first expression? It is minus 2e to
the minus 2x. And we multiply that times
the second expression. Cosine of x plus c2 sine of x. And then we add that to just the
regular first expression. So plus e to the minus 2x times
the derivative of the second expression. So what's the derivative
of cosine of x? It's minus sine of x. And then what's the derivative
of c2 sine of x? Well , it's plus
c2 cosine of x. And let's see if we can do any
kind of simplification here. Well actually, the easiest
way, instead of trying to simplify it algebraically and
everything, let's just use our initial condition. Our initial condition is y
prime of 0 is equal to 0. Let me write that down. Second initial condition was
y prime of 0 is equal to 0. So y prime, when x is equal
to 0, is equal to 0. And let's substitute x is equal
to 0 into this thing. We could have simplified this
more, but let's not worry about that right now. So if x is 0, this is going
to be 1, right? E to the 0. e to the 0 is 1, so we're left
with just minus 2, right? Minus 2 times e to the 0, times
cosine of 0, that's 1, plus c2 times sine of 0. Sine of 0 is 0. So that's just 1 plus 0, plus
e to the minus 2 times 0. That's just 1. Times minus sine of 0. Sine of 0 is just 0. Plus c2 times cosine of 0. Cosine of 0 is 1. So plus c2. That simplified things,
didn't it? So let's see, we get 0 is equal
to-- this is just 1-- minus 2 plus c2. Or we get c2 is equal to 2. Add 2 to both sides.
c2 is equal to 2. And then we have our particular
solution. I know it's c2 is equal to
2, c1 is equal to 1. Actually, let me erase some of
this, just so that we can go from our general solution to
our particular solution. So we had figured out, you can
remember, c1 is 1 and c2 is 2. That's easy to memorize. So I'll just delete
all of this. I'll write it nice and big. So our particular solution,
given these initial conditions, were, or are, or is
y of x is equal to-- this was a general solution-- e to
the minus 2x times-- we solved for c1, it's equal to 1. So we can just write
cosine of x. And then we solved for c2. We figured out that
that was 2. Plus 2 sine of x. And there you go. We have our particular solution
to this-- sorry where did I write it-- to this
differential equation with these initial conditions. And what's neat is, when we
originally kind of proved this formula-- when we originally
showed this formula-- we had all of these i's and
we simplified. We said c2, it was a combination
of some other constants times some i's. And we said, oh we don't know
whether they're imaginary or not, so let's just merge them
into some constant. But what's interesting is this
particular solution has no i's anywhere in it. And so, that tells us a
couple of neat things. One that, if we had kept this
c2 in terms of some multiple of i's, and our constants
actually would have had i's and they would have canceled
out, et cetera. And it also tells us that this
formula is useful beyond formulas that just involve
imaginary numbers. For example, this differential
equation, I don't see an i anywhere here. I don't see an i
anywhere here. And I don't see an
i anywhere here. But given this differential
equation, to get to the solution, we had to use
imaginary numbers in between. And I think this is the first
time-- if I'm remembering all my playlists correctly-- this is
the first time that we used imaginary numbers for
something useful. We used it as an intermediary
tool where we got a real, a non-imaginary solution,
to a real problem, a non-imaginary problem. But we used imaginary numbers
as a tool to solve it. So, hopefully, you found that
slightly interesting. And I'll see you in
the next video.