Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: How to solve an ode like this in Mathcad?

$
0
0

The problem is the definition of a^(1/3) of being the complex solution of the equation x=a^3 which has the smallest argument.

 

While 8^(1/3) is 2 (agrument = 0) we do NOT get (-8)^(1/3)=-2 (argument = pi) but a complex value with magnitude 2 and argument pi/3.

 

So whenever y(x) gets neagtive your calculations returns a non-real value and odesolve fails.

 

Resist from writing |y(x)|^(1/3) as this will work (its even faster), but give you a wrong result (see attachment).

 

Fortunately there is a compromise built into Mathcad. The root symbol defaults to the real value and that solves your problem (calculation time is significantly higher - not sure why).

 

1.png


Viewing all articles
Browse latest Browse all 12488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>