cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

ODESOLVE

AS_9965500
4-Participant

ODESOLVE

No. 2.jpg

It will be very useful if you help me.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:AS_9965500)

You wrote "y" where you should have written "y(x)"

 

Do you really mean y(x^2) in the second derivative and not just y(x)?

 

Mathcad does fine with y(x)

Werner_E_0-1623529781797.png

 

View solution in original post

8 REPLIES 8
Werner_E
25-Diamond I
(To:AS_9965500)

You wrote "y" where you should have written "y(x)"

 

Do you really mean y(x^2) in the second derivative and not just y(x)?

 

Mathcad does fine with y(x)

Werner_E_0-1623529781797.png

 

AS_9965500
4-Participant
(To:Werner_E)

Thank you very much. You are very helpful, This is my second day learning mathcad.

 

For the second derivative it is y"(x^2). I don't understand either. Can you give me a reason for this?

Now there is a new problem again. In Mathcad Prime 7 it is readable. But in Mathcad 15 it can't. Please let me know.

Can you please find a solution?

Werner_E
25-Diamond I
(To:AS_9965500)

I don't have Prime 7 installed so I can't read your P7 file.

In your MC15 file you will have to define D as a function of x and w and not of v and w.
But you are solving a quite different ODE (system) using rkfixed compared to the one with odesolve

Werner_E_0-1623545999807.pngWerner_E_0-1623546427477.png

To solve the same ODE with rkfixed as with odesolve, you would do like this:

Werner_E_0-1623546866455.png

 

 

Note that you don't need to define a range for x!

AS_9965500
4-Participant
(To:Werner_E)

This one please.

LucMeekes
23-Emerald III
(To:AS_9965500)

Here's the file in Prime6

 

Luc

 

P.S.

 

With reference to: https://community.ptc.com/t5/PTC-Mathcad/Toolbox-Solving-Ordinary-Differential-Equations-symbolically/m-p/689336#M192090

the exact solution to your ODE is:

LucMeekes_0-1623569796217.png

(Note that you cannot do this in Prime)

A comparison with the Odesolve solution:

LucMeekes_0-1623570409916.png

 

Werner_E
25-Diamond I
(To:AS_9965500)

Thanks to Luc for providing your sheet in version 6.

 

1) In Prime you don't use "Given" to start a solve block but you rather must insert an ugly solve block module via the menu or by pressing Ctrl-7.
Furthermore the syntax for odesolve has changed. Here is how to make it work (of course I had to change the argument x^2 in the second derivative to a single x to make it work):

Werner_E_0-1623606783646.png

 

2) rkfixed worked for you in Prime because you used the same variable name (v) as argument of the function D AND also on the right hand side of its definition. In the MC15 sheet you had used "v" as argument but used "x" on the right hand side.
BTW, I don't think that a 3D plot it makes much sense here.
In case you are not aware of:

The first column are the x-values, the other columns correspond to the functions of your ODE system.

Typically you would plot each of these columns over the first one and use far more than just 10 intervals:

Werner_E_1-1623607630900.png

 

 

Juanneumann72
14-Alexandrite
(To:Werner_E)

Hi, 

Im trying to solve an ODE equation system for an adiabatic closed reactor. When I try to solve via ODESOLVE all variables keep as straigth lines.

Thanks in advance!

Announcements

Top Tags