Documentation: Forgot to change one ~a to ~A.
[maxima/cygwin.git] / demo / eaton2.dem
blob96866a1713f34f87ef5ecdd59bd106df6ab47a38
1 showtime:true$
2 loadprint:false$
3 eqn1:a*cos(p2)=s+b*cos(p3);
4 eqn2:a*sin(p2)=e+b*sin(p3);
5 /* declare p2, p3 and s to be time-dependent. */
6 depends([p2,p3,s],t);
7 /* [1] from equations 1 and 2, eliminate p3: */
8 eqn3:expand((eqn1-s)^2+(eqn2-e)^2);
9 eqn3:trigsimp(eqn3);
10 /* [2] using the results of step 1, solve for s in terms of
11        a,b,e,p2: */
12 s_solution:solve(eqn3,s);
13 /* note that this differs from the result given.
14    [3] take the derivative of eqn2 wrt t:  */
15 eqn3:diff(eqn2,t);
16 /* [4] solve for p3-dot in terms of a, b, p2, p2-dot,p3. */
17 p3_dot:solve(%,diff(p3,t));
18 /* [5] take the derivative of eqn2 wrt t:  */
19 eqn5:diff(eqn1,t);
20 /* [6] solve for s-dot in terms of a, b, p2, p2-dot,p3. */
21 solve(eqn5,diff(s,t));
22 %,p3_dot,factor;
23 trigreduce(%);
24 /* [7] */
25 z:i*(a*cos(p2)/(b*cos(p3)))^2;
26 diff(z,p2);