Am I expanding e^ix incorrectly?

  • Context: Graduate 
  • Thread starter Thread starter sa1988
  • Start date Start date
  • Tags Tags
    Expanding
Click For Summary
SUMMARY

The discussion revolves around solving the ordinary differential equation (ODE) y'' + y = t using the characteristic method. The user initially derives the complementary solution as yc = Aei t + Be-i t, which expands incorrectly to include imaginary terms. However, the correct solution provided by Mathematica's DSolve is yc = Asin(t) + Bcos(t), indicating that the constants A and B can be complex numbers. The confusion arises from the treatment of imaginary components in the context of real-world applications, particularly in fluid dynamics.

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with complex numbers and their representation
  • Experience with Mathematica, specifically the DSolve function
  • Knowledge of the relationship between exponential and trigonometric functions
NEXT STEPS
  • Study the properties of complex numbers in differential equations
  • Learn about the use of initial conditions in solving ODEs
  • Explore the implications of imaginary components in real-world physics problems
  • Investigate the differences between solutions derived analytically and those computed using software like Mathematica
USEFUL FOR

Students and professionals in mathematics, physics, and engineering, particularly those working with differential equations and fluid dynamics.

sa1988
Messages
221
Reaction score
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
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   Reactions: sa1988
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?
 
You can tuck away imaginary parts. A and B are "complex numbers" now.
 
  • Like
Likes   Reactions: sa1988
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.
 
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.
 
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:
 
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:
 
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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K