Skip to main content
5-Regular Member
March 29, 2020
Solved

Ordinary Differential Equations variable undefined

  • March 29, 2020
  • 1 reply
  • 6821 views

Hello

I do not have a lot of experience with mathcad. Please help me!
I have to solve and ode which includes some equations. Now I can not calculate it because it says variabe undefined.
Why that?

ODE.PNG

Best answer by Werner_E

OK, after a further look at your sheet I realized, that my advice of turning all functions into functions of t wasn't a good one. It should have worked (but for some reason it doesn't) but it sure was unnecessary.
The only advice which is to follow is to put the functions outside of the solve block (so you can also use them after the solve block).

I edited your last sheet (is attached) accordingly and now it works as supposed. Sorry for the confusion.

Werner_E_0-1585570486075.png

Werner_E_0-1585571133233.png

 

 

EDIT: Yes, I speak German, I'm Austrian.

 

1 reply

21-Topaz II
March 29, 2020

Hi

Attach your worksheet, or at least a worksheet that shows the problem you have. NOT just a picture.   Look below the Body text entry block and above the post button.  You can see a section where you can drag/drop or browse to add files.

 

You have not defined the function z2(t)  so Prime protests.

 

Cheers

Terry

 

 

5-Regular Member
March 29, 2020

Hi Terry

Thanks for helping

Attached the worksheet. I already figured out that it works if i define my equations as function from x2 and z2 and only the ode as function from x2 z2 and t.
Is this correct?
But now I want also plot for example Sz and Sx but i do not know how.
Maybe the whole approach is wrong.
Cheers

Andreas

23-Emerald I
March 29, 2020

I've only got Express, so I had to work around the ODE solve blocks.  

 

Attached Prime 6 Express.