# Starting initial value problems when terms are expressed only in x

1. Sep 17, 2011

### metalscot

How should I go about starting the following two problems

solve the following initial value problems

x''-4x=0 ; x(0)=1, x'(0)=0
and
x''-4x'+4x=0 ; x(0)=1, x'(0)=0

Should i use a general solution with the basis m^2-4=0 for problem one and m^2-4x+4=0 for the second?

2. Sep 17, 2011

### ehild

Yes, if you meant the solutions in form exp(mt), and m^2-4m+4=0 for the second problem.

ehild

3. Sep 17, 2011

### metalscot

Thanks ehild, do I then use x=1 and and t=0 to find constant A and x'=1 and t=0 to find constant B for both questions?

4. Sep 17, 2011

### ehild

The general solution is x=A exp(m1t)+B exp(m2t). Use t=0 x=1 to get one equation for A and B, and t=0, x'=0 in x'(t) to get the other equation for A and B. You get two equations, with two unknown, solve for A and B.

ehild

5. Sep 18, 2011

### metalscot

Working through my first problem x''-4x=0 ; x(0)=1 x'(0)=0

characteristic equation is m^2-4=0

solutions m=+/-2i

so complex solution (e^2it, e^-2it)

since (cos2t, sin2t)

x(t)=Acos2t-Bsin2t

For x(0)=1

1=A-0
so
A=1

x'(t)= -2Asin2t-2Bcos2t

for x'(0)=0

0=0-2B
so
B=0

therefore

x(t)=cos2t

does this seem correct?

6. Sep 18, 2011

### ehild

The solutions of the characteristic equation m^2-4=0 are real m=±2.

ehild

7. Sep 18, 2011

### metalscot

Im sorry ehild im confused by this, does this mean that my A and B constants are correct making x(t) = cos2t a solution?

8. Sep 18, 2011

### ehild

cos(2t) and sin(2t) are not solutions.

ehild

9. Sep 18, 2011

### HallsofIvy

Staff Emeritus
If one solution to the characteristic equation of a linear differential equation with constant, real, coeficients is the complex number a+ bi, then $y= e^{at}cos(bt)$ and $e^{at}sin(bt)$ are solutions.

In particular, if the real number a (+ 0i) is a root then a solution is $y= e^{at}$.

If the imaginary number 0+ bi is a root then two solutions are cos(bt) and sin(bt). (Of course, complex, including imaginary, roots of an equation with real coefficients always come in conjugate pairs: $a\pm bi$.)

Which case applies here?

10. Sep 18, 2011

### metalscot

the real number is a root, so my solution must be in the form y= e^{at}[/itex]. ?

11. Sep 18, 2011

### metalscot

the real number is a root, so my solution must be in the form y= e^{at}[/itex]. ?

12. Sep 18, 2011

### ehild

Yes, and you have two values for the exponent, the solutions of your characteristic equation m^2-4=0. You have written that already, but you said that the solutions are 2i and -2i, which is wrong. m^2-4=0 is equivalent m^2=4. What are the roots?

ehild

13. Sep 18, 2011

### metalscot

The solutions of the characteristic equation m^2-4=0 are real m=±2.

does the above not mean that -2 and 2 are roots?
So that then m1 and m2 are -2and 2?

Last edited: Sep 18, 2011
14. Sep 18, 2011

### ehild

Yes, 2 and -2 are the roots.

You got the characteristic equation originally by assuming that the solution of the differential equation x''-4x=0 is of the form x(t)=emt.
The second derivative is x''(t)=m2emt.
Substituting x(t) and x''(t) back into the DE, you get

m2emt-4emt=0,

factoring out the exponent :

(m2-4)emt=0, which can be true for all t if

m2-4 =0.

This is true for m=2 and m=-2, so the solutions of the DE can be written really in the form of x(t)=emt, and we have two independent solutions, x1(t)=e2t and x2(t)=e-2t.

The general solution is a linear combination of these two functions,

x(t)=Ae2t+Be-2t.

Find A and B so that x(0)=1 and x'(0)=0.

ehild

15. Sep 18, 2011

### metalscot

I think ehild I have finally arrived at the correct solution

when x(t) = Ae^2t + Be^-2t

x(0)=1

Ae^2t + Be^-2t=1

and x'(0)=0

2Ae^2t - 2Be^2t =0

so with simultaneous equations A = 1/2 AND B = 1/2

I arrive at

x(t)=1/2 e^2t + 1/2 e^-2t

I hope you can tell me this is correct?

16. Sep 18, 2011

### ehild

Yes, it is correct. Nice work! Now solve the other problem.

ehild

17. Sep 18, 2011

### metalscot

Thank you ehild. I believe I have now managed the other problem, can you confirm the solution to be x(t) = e^2t - 2te^2t

Last edited: Sep 18, 2011
18. Sep 19, 2011

### ehild

Good, it is the solution! But use parentheses in the exponent!

ehild

19. Sep 29, 2011

### ollyfinn

Hi,

I too am trying to solve the second of your problems.

I have used the characteristic equation to find ou that m = 2

I have then used the general solution:

x(t) = Ae^m0t + Bte^m0t

This has given me the following:

x(0) = Ae^2t + Bte^2t = 1

Ae^2(0) + B(0)e^2(0) = 1

A(1) + B(0)(1) = 1

A + 0 = 1

Therfore A = 1

For B:

x'(0) = 2Ae^2t + 2Bte^2t = 0

This is where I am getting confused. Plugging in the 0 value for t:

2Ae^2(0) + 2B(0)e^2(0) = 0

2A(1) + 2B(0)(1) = 0

As A = 1

2(1)(1) + 2B(0)(1) = 0

2 + 2B(0)(1) = 0

2B(0)(1) = -2

Now from your final answer I see that A = 1 and B = -2 to give x(t) = e^2t - 2te^2t

When I multiply out the RHS of the above equation does B remain even though it has been multiplied by zero? I cant see this as in the equation to solve A as 1 the B side equals 0 and the sum is the same. I am sure I am missing something obvious but the more I look at it the more clouded it becomes!

20. Sep 29, 2011

### ehild

x(t) = Ae^(2t) + Bte^(2t)

The second term is a product of t and e^(2t), apply the product rule!

x'(t) = 2Ae^(2t) + 2Bte^(2t)+Be^(2t).

ehild