


More on differential Equations in MATHCAD 





What has gone wrong ? 

MathCAD crashed 

MathCAD Error message 

Result looks wrong 





Often OLE related 

Room 112 especially 

Cut/Paste into sheet 

Don’t try editing drawings from MathCAD 

Try restarting mathCAD 

Sometimes logout/reboot 

Save work frequently 




MathCAD displays message & highlights part
of worksheet. 

Press <f1> for more help on error 







Everything must be defined before being used 

Left>Right, Top>Bottom 

Check spelling, font etc. carefully 

Cut & Paste variable name from earlier 

Watch text subscripts 




Using function name instead of variable –
missing brackets 

Used a range variable in wrong place 




Can’t have e^{x} where x has dimensions 

Can’t have dimensions in output of rkfixed 

No term of D(t,A) can have dimensions 

No element of ic can have dimensions 

TStart and TFinish times must be dimensionless 




Problems with creation of D(t,F) vector 

Let F be a vector of functions relating to
system (unknown) 

D(t,F) is a vector of the derivatives of F
(given) 




Simple first order 

One unknown function (A) 

One member of derivative vector 




Double decay 

2 functions => 2 derivatives 




SHM System 

2 equations 

2 derivatives 

q_{0} è charge 

q_{1} è current 

q_{2} è expressed in terms of q_{0}
&q_{1} 






X & Y axis motion independent 

2^{nd} order in each dimension 

è 4 equations, 4 derivatives 

F0 è x position 

F1 è y position 

F2 è x velocity è d/dt (F0) 

F3 è y velocity è d/dt (F2) 






Given Velocity & angle 

Calculate vx & vy 

Position = (0,0) 

Form ic vector 




Calculate N from length of simulation &
timestep 

Remove Units 



Call Solver 







Key Points: 

Time Indicator 

Position Now 

Track 




Animation depends on FRAME variable 

MathCAD sets FRAME to a range of values 

Calculates worksheet for each FRAME 

Save to file to create .AVI file 




Create vectors for Time, X & Y 







Pull out time of current FRAME 




Pull out position from X & Y position
vectors 



Use submatrix to create vector of X & Y
positions since t=0 






Make output depend on FRAME 

ViewAnimate to display dialog 

Fill in first & last frames 

Drag cursor around area to animate 

Select ‘Animate’ to go 

View with AVI player 

Save to disk 

Resource Centre for samples 





Fix scale of graphs 

Watch out for: 

Size of AVI files 

Long calculation times 

Can test by using
FRAME:= 

Delete afterwards 

Put indicator in movie 




Limited Use 

Good for making up filenames for READPRN()
function 

Collect datafiles 
