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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Jacobian Calculation Crashes for System of ODEs

JohnRudnicki
14-Alexandrite

Jacobian Calculation Crashes for System of ODEs

I have a program that works (PPPWorks_12_19_2020) for solving a system of odes using Radau with the Jacobian (I am using this because the solutions have peaks which are slightly better resolved with this choice). I made what I thought was an innocuous change (PPPNoWork_12_19_2020) adding the equation dA=0 so that I could set the value of A in the initial conditions. Now the calculation for the Jacobian grinds away for a while, then crashes MathCad. What did I do wrong? Maybe I now have two many equations d(...)= 0 for setting parameters in the IC? Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions

A:=A makes the variable undefined for symbolic calculations.

If you delete the assignment A:=0, the variable is undefined anyway, so A:=A is not necessary.

Werner_E_1-1608595154615.png

 

 

View solution in original post

4 REPLIES 4

Shouldn't you enable the region "A:=A" ?

JohnRudnicki
14-Alexandrite
(To:Werner_E)

Thanks for the clue, but the problem was that I had already set A:=0 a few lines above and did not remove it when I tried to put A in the initial conditions. It worked still leaving A:=A disabled. BTW do you know why it is necessary to set a:=a, etc. I modified this program from one Alvaro posted a few years ago in reponse to another question i had. I copied this but never understood it.

A:=A makes the variable undefined for symbolic calculations.

If you delete the assignment A:=0, the variable is undefined anyway, so A:=A is not necessary.

Werner_E_1-1608595154615.png

 

 

JohnRudnicki
14-Alexandrite
(To:Werner_E)

Thanks. Happy Holidays.

Top Tags