/usr/share/maxima/5.24.0/demo/eaton2.dem is in maxima 5.24.0-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | showtime:true$
loadprint:false$
eqn1:a*cos(p2)=s+b*cos(p3);
eqn2:a*sin(p2)=e+b*sin(p3);
/* declare p2, p3 and s to be time-dependent. */
depends([p2,p3,s],t);
/* [1] from equations 1 and 2, eliminate p3: */
eqn3:expand((eqn1-s)^2+(eqn2-e)^2);
eqn3:trigsimp(eqn3);
/* [2] using the results of step 1, solve for s in terms of
a,b,e,p2: */
s_solution:solve(eqn3,s);
/* note that this differs from the result given.
[3] take the derivative of eqn2 wrt t: */
eqn3:diff(eqn2,t);
/* [4] solve for p3-dot in terms of a, b, p2, p2-dot,p3. */
p3_dot:solve(%,diff(p3,t));
/* [5] take the derivative of eqn2 wrt t: */
eqn5:diff(eqn1,t);
/* [6] solve for s-dot in terms of a, b, p2, p2-dot,p3. */
solve(eqn5,diff(s,t));
%,p3_dot,factor;
trigreduce(%);
/* [7] */
z:i*(a*cos(p2)/(b*cos(p3)))^2;
diff(z,p2);
|