Imaginary numbers what to do with them

  • #1

Main Question or Discussion Point

I have attached an image showing the three possible solutions (as determined by Mathematica) when solving for the peak velocity(Vs) in a trapezoidal move where the following are already known: distance(d),total time(t),units of acceleration(Ma),units of deceleration(Ma),initial velocity(Vi), final velocity(always zero for my purposes).

One of these equations is presumably correct, and you will notice that the second two equations contain an imaginary number 'i" in two places in the equation. I am trying to write the correct equation up in a programing language that has no provision for incorporating imaginary numbers.

Is there a way I can rewrite these equations without the 'i' imaginary number... substituting the 'i' with a placeholder of some kind and changing the negative values that need to be "square rooted" with positive ones?

I already tried writing up the first equation which uses no 'i' imaginary numbers in the programming language but the value under the square root turns out to be a negative number, causing an illegal square root error. If I simply change the value to positive the equation will process but it does not give a true answer based on the known values I input. I'm guessing that this is not the equation that will give me the actual solution, so I will need to use one of the two equations that involve imaginary numbers.

Can anyone help?

Thanks
 

Attachments

Answers and Replies

  • #2
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
18
Before you spend too much effort, you should try plugging in numerical values using Mathematica, to make sure you actually have the answer you wanted!

What language are you using, by the way?
 
  • #3
Hurkyl,

Good suggestion! None of the three formulas returned valid results when I plugged values back in to them, but the source formula does produce valid results so I am not sure when I am doing wrong. As you can see in the attached jpg I get an error:

"Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result"

Perhaps there is another method to solve for this equation in Mathematica, or I am writing it up incorrectly?

I have attached a new jpg showing that when I make assumptions about the values Mathematica will return the correct result as the third answer in its set of possible solutions.
 

Attachments

  • #4
I have attached an image showing the three possible solutions (as determined by Mathematica) when solving for the peak velocity(Vs) in a trapezoidal move where the following are already known: distance(d),total time(t),units of acceleration(Ma),units of deceleration(Ma),initial velocity(Vi), final velocity(always zero for my purposes).

One of these equations is presumably correct, and you will notice that the second two equations contain an imaginary number 'i" in two places in the equation. I am trying to write the correct equation up in a programing language that has no provision for incorporating imaginary numbers.

Is there a way I can rewrite these equations without the 'i' imaginary number... substituting the 'i' with a placeholder of some kind and changing the negative values that need to be "square rooted" with positive ones?

I already tried writing up the first equation which uses no 'i' imaginary numbers in the programming language but the value under the square root turns out to be a negative number, causing an illegal square root error. If I simply change the value to positive the equation will process but it does not give a true answer based on the known values I input. I'm guessing that this is not the equation that will give me the actual solution, so I will need to use one of the two equations that involve imaginary numbers.

Can anyone help?

Thanks
I know that is possible to denote complex numbers with matrices instead of using i. That should be easy to find.
 
  • #5
Thanks Patrick...

I'm going to create a new topic to try to solve the problem with my Mathematica output before continuing because I don't have a formula that works anyway.

Lars
 

Related Threads on Imaginary numbers what to do with them

Replies
9
Views
4K
  • Last Post
Replies
5
Views
26K
Replies
1
Views
1K
Replies
2
Views
2K
Replies
3
Views
2K
Replies
3
Views
2K
Replies
2
Views
3K
Replies
5
Views
1K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
3
Views
3K
Top