Skip to main content
5-Regular Member
April 16, 2024
Solved

MathCAD Prime 9.0/10..0 Differential Equation Second Order

  • April 16, 2024
  • 2 replies
  • 2159 views

Hello Community Members,

 

I would appreciate your help in fixing the solution to a second order differential equation. 


I am attaching the spreadsheet I created in Mathcad 10.


Thanks in advance for a timely feedback!
Best regards, Peter

Best answer by Werner_E

The correct syntax is y:=odesolve... and not y(t):=...

But the main problem is the fact, that M and F0 are vectors and not scalars!

For every line in the vectors M and F0 you would get a different function x!!

Here as an example I have chosen index 1001

Werner_E_0-1713261884719.pngWerner_E_1-1713261894095.png

 

You may also parametrize the solve block with the vector index.

Werner_E_2-1713262343055.png

Now you could show a few of the 4000 different functions in one plot

Werner_E_4-1713262532893.png

Prime 10 worksheet attached

 

 

 

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
April 16, 2024

The correct syntax is y:=odesolve... and not y(t):=...

But the main problem is the fact, that M and F0 are vectors and not scalars!

For every line in the vectors M and F0 you would get a different function x!!

Here as an example I have chosen index 1001

Werner_E_0-1713261884719.pngWerner_E_1-1713261894095.png

 

You may also parametrize the solve block with the vector index.

Werner_E_2-1713262343055.png

Now you could show a few of the 4000 different functions in one plot

Werner_E_4-1713262532893.png

Prime 10 worksheet attached

 

 

 

12-Amethyst
April 16, 2024

Is Prime 10 released ? - was not aware of this.

 

Owe

 

 

25-Diamond I
April 16, 2024

@o.svahn wrote:

Is Prime 10 released ? - was not aware of this.

 

Owe

 

 


Yes it is. I wasn't aware of it , either, until I noticed this post
https://community.ptc.com/t5/Mathcad/MATHCAD-User-defined-functions-in-FORTRAN/m-p/943397/highlight/true#M211221

and (successfully) tried to download P10 and get a new license file generated 😉

23-Emerald IV
April 16, 2024

The simpler approach is the fact that the solution for the ODE:

LucMeekes_0-1713271447681.png

is:

LucMeekes_1-1713271809041.png

And with: x(0)=0 and x'(0)=0 the two constant C0 and C1 are each zero, so:

LucMeekes_2-1713271935769.png

And with this you can plot x(t) for any values of F and M.

 

Success!
Luc

 

5-Regular Member
April 17, 2024

Hello Luc, thanks for the valuable feedback! Best wishes, Peter