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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Solve System of Differential Equations

Suki
10-Marble

Solve System of Differential Equations

Hi I am trying to solve system of 2 ODE as shown below. I am unable to find out the issue. 

SG_5146549_1-1663269394637.png

The error happens when I m trying to relate the first ode to the second one. I am getting error as "Unknown error: ode% _function% _illegal % _context. Please help!

 

12 REPLIES 12
LucMeekes
23-Emerald III
(To:Suki)

Please attach your Prime worksheet.

 

Success!

Luc

Suki
10-Marble
(To:LucMeekes)

Hi Luc,

 

The calculation has been done at the bottom of the mathcad sheet. Please see attached.

 

Thanks

 

Sukrit

LucMeekes
23-Emerald III
(To:Suki)

Have a look here https://community.ptc.com/t5/Mathcad/Multiple-ODE-s-in-MathCad/m-p/785905#M200434

Similar problem, solved.

 

Success!
Luc

Suki
10-Marble
(To:LucMeekes)

So its not possible in Mathcad Prime in a solve block?

 

Symbolic Math is not incorporated well in the Mathcad software like Mathematica.

LucMeekes
23-Emerald III
(To:Suki)

It IS possible using a solve block, but it takes a little effort. Have a close look on what @Werner_E accomplished in that thread.

 

Alternatively you should be able to solve it symbolically in Prime. For that you'd have to make use of my latest addition to https://community.ptc.com/t5/Mathcad/Toolbox-Solving-Ordinary-Differential-Equations-symbolically/m-p/689336#M192090 .

Success!
Luc

Suki
10-Marble
(To:LucMeekes)

Feature does not work on Mathcad Prime. 😞 MATHCAD so full of bugs.

LucMeekes
23-Emerald III
(To:Suki)

With your set of ODE's this is the result:

LucMeekes_0-1663410886754.png

but if your ode's are

LucMeekes_1-1663410962266.png

and

LucMeekes_2-1663410980079.png

you may get:

LucMeekes_3-1663411004169.png

See attachment for further details.

(For further information on the solving of ODE's refer to https://community.ptc.com/t5/Mathcad/Toolbox-Solving-Ordinary-Differential-Equations-symbolically/m-p/689336#M192090 and have a look at the Prime file in there.)

 

Success!
Luc

Hmm!

 

Express, using integration and boundary conditions to solve for constants of integration:

Fred_Kohlhepp_0-1663417008282.png

 

LucMeekes
23-Emerald III
(To:Fred_Kohlhepp)

Hi Fred,

I guess yours is the correct result.

After checking a few items in my sheet, I find that the solution of w00 through w07 is incorrect.

If I have time later, I'll check my method with Mathcad 11.

 

Luc

LucMeekes
23-Emerald III
(To:Fred_Kohlhepp)

Found the culprit. Prime has this nice '-operator (quote, gives the derivative), but it is apparently only intended for single parameter functions, such as f(x), but not for f(x,y,z).

So I ended up defining the derivatives explicitly and then solving for the initial conditions. That results in the correct answers.

 

Luc

Suki
10-Marble
(To:LucMeekes)

Thanks Luc, it looks like a solution without using solve block feature.

 

I might write 8 equations by integrating each of the Differential equation 4 times and then substitute the boundary condition and solve the problem by finding unknowns. The program does not automatically catch boundary conditions establishing a relationship of one differential equation to another. 

 

 

Fred_Kohlhepp
23-Emerald I
(To:Suki)

I can't use solve blocks (I only have Express), but by integrating and applying boundary conditions to evaluate integration constants we can still address this problem.  I doubt that you intended to set such a simple problem.  Attached is Prime 4 discussion.

Announcements

Top Tags