Am I expanding e^ix incorrectly?

  • Thread starter sa1988
  • Start date
  • Tags
    Expanding
In summary, the Mathematica solution found that yc = Asin(t) + Bcos(t), which is not the same as y = Ae^(it) + Be^(-it).
  • #1
sa1988
222
23
I'm working on a pretty simple ODE but am getting really confused about one little bit.

It's of this form:

y'' + y = t

So, in solving the complementary solution I use the characteristic method to find:

λ2 + 1 = 0

Hence λ = ± i
Therefore:
yc = Aei t + Be-i t

This expands to:
yc = Acos(t) + i Asin(t) + Bcos(t) - i Bsin(t)

BUT

If I run the same thing through DSolve in Mathematica, I get:

yc = Asin(t) + Bcos(t)

There's a clear similarity between that and my own answer, but also a very clear difference!

Where have I gone wrong? Where are the imaginary terms in the Mathematica solution? Plus, even if I ignore or cancel the imaginary terms in my solution I end up with (A+B)cost(t) which is still wrong, it seems.

What's gone wrong?

Thanks!
 
Last edited:
Physics news on Phys.org
  • #2
y = Ae^(it) + Be^(-it)
is equivalent to
y = Asin(t) + Bcos(t)

It's just that the A's and B's are not the same.
 
  • Like
Likes sa1988
  • #3
DuckAmuck said:
y = Ae^(it) + Be^(-it)
is equivalent to
y = Asin(t) + Bcos(t)

It's just that the A's and B's are not the same.

Oh man, that's so obvious I should probably go and hide in a cave somewhere and think about my idiocy, ha.

So I'm right in assuming the imaginary term has simply been tucked away into A or B?

I'm getting it like this:

yc = (iA-iB)sin(t) + (A+B)cos(t)

= Csin(t) + Dcos(t)

I didn't know it was permissible to tuck the imaginary parts away like that though?
 
  • #4
You can tuck away imaginary parts. A and B are "complex numbers" now.
 
  • Like
Likes sa1988
  • #5
Great stuff, cheers.

I guess the thing that threw me is that the Mathematica solution didn't tell me " A, B ∈ ℂ "

I thought the imaginary parts were eliminated somehow.
 
  • #6
sa1988 said:
Great stuff, cheers.

I guess the thing that threw me is that the Mathematica solution didn't tell me " A, B ∈ ℂ "

I thought the imaginary parts were eliminated somehow.

They often are elimated by initial conditions, if you're doing a physics problem. But yes, you have to explicitly eliminate them. They are still there in the general case.
 
  • #7
DuckAmuck said:
They often are elimated by initial conditions, if you're doing a physics problem.

It actually is part of a physics problem, so I figured there'd be a point where I ignore the imaginary part because it's a 'real-world' fluid dynamics problem of a particle in a flow. The main thing confusing me however was just that 'imaginary' part of the differential equation. All good now! Thanks :oldsmile:
 
  • #8
sa1988 said:
It actually is part of a physics problem, so I figured there'd be a point where I ignore the imaginary part because it's a 'real-world' fluid dynamics problem of a particle in a flow. The main thing confusing me however was just that 'imaginary' part of the differential equation. All good now! Thanks :oldsmile:

Be careful though, imaginaries do exist in the real world. (Usually in electricity problems.) :oldsmile:
 
  • #9
DuckAmuck said:
y = Ae^(it) + Be^(-it)
is equivalent to
y = Asin(t) + Bcos(t)

It's just that the A's and B's are not the same.
Then you should use different pairs of letters...
 
  • #10
DuckAmuck said:
Be careful though, imaginaries do exist in the real world. (Usually in electricity problems.) :oldsmile:

Oh I know, heh, but it usually describes those sort of 'extra' numerical factors rather than something Real such as position, which is what I'm doing working on with this fluid dynamics stuff. My bad, I was too vague with what I said.
 

1. What is e^ix?

e^ix is a mathematical expression representing a complex number in the form of a real number raised to an imaginary power.

2. How do you expand e^ix?

e^ix can be expanded using the Euler's formula, which states that e^ix = cos(x) + i*sin(x), where i is the imaginary unit.

3. Can e^ix be expanded incorrectly?

Yes, e^ix can be expanded incorrectly if the correct formula is not used or if there are mistakes in the calculations.

4. What is the significance of e^ix?

e^ix is commonly used in mathematical and scientific equations involving trigonometric functions, such as in Fourier series and quantum mechanics.

5. How can I check if I expanded e^ix correctly?

You can check if you expanded e^ix correctly by plugging in a value for x and comparing the result to the expected value calculated using the Euler's formula.

Similar threads

Replies
8
Views
2K
Replies
4
Views
1K
  • Electromagnetism
Replies
4
Views
637
  • Other Physics Topics
Replies
2
Views
3K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
1K
Replies
4
Views
1K
  • Differential Equations
Replies
8
Views
2K
  • Differential Equations
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Back
Top