Maxima Book Chapter 9
Maxima Book Chapter 9
In this chapter we present examples of solutions to ordinary differential equations (ODes) using Maxima. Review of ODE solution methods from the wxMaxima interface In the introduction of menu options and interface buttons for the wxMaxima interface in previous chapters, we came across some simple examples of ODE solutions including general solutions, initial value problems, and boundary value. We review them next. Function ode2 (Equations > Solve ODE or [Solve ODE...] button) General solution to ODE In Chapter 1 (Introduction to Maxima) we introduced a simple ODE solution when illustrating the use of the [ Solve ODE...] button in the wxMaxima interface. This solution is repeated here. Press the [ Solve ODE...] button, or use the menu item Equations > Solve ODE ... in the wxMaxima interface, and try the following input:
The [ Solve ODE... ] button can be used, therefore, to activate function ode2 to produce the general solution of first and second order ODEs. For example, the 2nd order ODE:
d2 y y =sin 3x , 2 dx
9-1
The constant of integration in the first solution is referred to as %c, while the two constants of integration in the second example are %k1 and %k2. An attempt to find a general solution to a third-order ODE fails:
Function ic1 - Solving an initial value, first-order ODE problem To solve an initial value, first-order ODE problem, you can use the menu item Equations > Initial value problem (1), after you have used function ode2 (see above) to produce a general solution. The procedure, thus, requires two steps as illustrated in this example. Solve the ODE
dy y= x dx
subject to the initial condition y(0) = 1. First, use Equations > Solve ODE... to produce the general solution:
9-2
which produces:
which produces:
Alternatively, you could just enter the two inputs directly into an input cell in the wxMaxima 0.8.2 interface, e.g.,
Attempting the solution of a second-order ODE followed by an initial value evaluation produces an error, e.g.,
9-3
Function ic2 - Solving an initial value, second-order ODE problem The solution to an initial value, second-order ODE problem requires two initial conditions at the initial point, one is a value of the function, and the second one is a value of the derivative at the same initial point. To solve an initial value, second-order ODE problem in Maxima, first solve the general solution, and then use the menu option Equations > Initial Value Problem(2), as illustrated next. Solve the ODE
d 2 y dy y =0 2 dx dx
subject to the initial conditions y(0) = 1, and First, select Equations > Solve ODE... and enter:
dy =1 . dx
This produces:
9-4
Function bc2 - Solving a boundary value, second-order ODE problem To solve a boundary value, second-order ODE problem it is necessary to provide values of the function at two different values of the independent variable. To obtain the solution to a boundary value, second-order ODE problem in Maxima, first obtain a general solution, and then replace the boundary values using the menu item: Equations > Boundary Value Problem ... For example, solve the ODE
d y 1 dy 3y =0 2 2 dx dx
2
subject to the boundary conditions y(0) = 1, and y(5) = -1. First, obtain a general solution by using the menu item Equations > Solve ODE and enter:
9-5
Next, select the menu item Equations > Boundary Value Problem and enter:
Function desolve - Solving an ODE using Laplace transforms The menu item Equations > Solve ODE with Laplace uses Laplace transforms to obtain the general solution of an ODE of any order. The solutions thus provided could be quite involved since they are shown in terms of derivatives of the solution at the initial value of zero for the independent variable. For example:
is:
9-6
Replacing initial conditions If the initial conditions are known, you can replace them into the general solution by using function subst, available, for example, through the [Subst...] button in the wxMaxima interface. However, in order to produce this substitutions you should be able to write expressions for the derivatives at x = 0. For example, to produce the result
Thus, if you have produced a general solution such as the one shown above, you can proceed to produced the required substitutions as indicated below. First, produce the solution using the command:
9-7
Then, substitute the values of the second and first derivatives, and of the function, at x= 0, in that order:
The final result is easier to understand, showing only missing constant such as D2y0, Dy0, and y0, instead of the full expressions for the derivatives. If you have specific values for these constants, you could substitute them at once using, for example:
Using initial conditions with the atvalue function If you want to solve an ODE using Laplace transforms, and provide the initial conditions from the start, rather than substituting them after obtaining the solution, you can load those initial conditions using function atvalue. This function can be obtained by using the menu item Equations > At Value Consider the solution to the second order equation:
dy d y 2 5y =0 2 dx dx
2
9-8
To solve this problem we could solve this problem as follows. First, define the ODE:
Then, use function atvalue to provide the initial conditions as listed above:
These two entries can be obtained by using the menu item Equations > At Value..., e.g.,
Finally, use function desolve to obtain the solution to the ODE initial value problem:
which produces:
9-9
Additional examples of first-order, initial value ODE solutions (*) This section illustrates the use of functions ode2, and ic1, in the solution of 1st-order ODEs. The examples in this section, and in all sections of this chapter whose titles are marked with an asterisk (*), were generously contributed by: Dr. Luigi Marino Professor of Informatics and Mathematics Liceo Camilo Golgi BRENO, Brescia, Italy All the examples shown in this section start with a given differential equation (ODE) and an initial condition y = y0, at x = x0. The general solution consists in using function ode2 to produce the general solution, followed by a call to function ic1 to substitute the initial condition into the solution. Plots of the solution then follow. Example 1 Solve
dy = xy 2 x , subject to the initial conditions: y(0) = 3. The solution dx using wxMaxima, including a plot y(x), is accomplished as follows:
9 - 10
Notice that the solution can be simplified algebraically by using function expand, namely:
9 - 11
Example 3 - Solve
9 - 12
9 - 13
x y dy , subject to the initial conditions: y(0) = 0. Also, solve = dx 2xy the ODE using the initial conditions y(2) = 3. Example 4 - Solve
2 2
This result includes y(x) in an implicit expression. We can use function ic1 to substitute the initial condition y(0) = 0, i.e.,
Next, we use function ic1 to substitute the second initial condition proposed, y(2) = 3, i.e.,
9 - 14
9 - 15
Example 6 - Solve
dy 2 = y , subject to the initial conditions: y(0) = 0. Also, solve the dx ODE using the initial conditions y(1) = 1.
Solution:
Additional examples of second order, initial value ODE solutions (*) This section illustrates the use of functions ode2, and ic2, in the solution of initial-value, 2nd-order ODEs. The examples in this section were also generously contributed by: Dr. Luigi Marino Professor of Informatics and Mathematics Liceo Camilo Golgi BRENO Brescia, Italy All the examples shown in this section start with a given differential equation (ODE) and an initial conditions y = y0 and diff(y,x) = y0p, at x = x0. The general solution consists in using function ode2 to produce the general solution, followed by a call to function ic2 to substitute the initial condition into the solution. Plots of the solution then follow.
9 - 16
Example 1 Solve
dy =1 , at x = 0. dx Solution:
9 - 17
9 - 18
9 - 19
9 - 20
9 - 21
Example 7 Solve
dy =3 , at x = 1. dx
Solution:
9 - 22
Example 8 Solve
dy =1 , at x = 0. dx Solution:
9 - 23
Example 9 Solve
dy =9 , at x = 0. dx
Solution:
9 - 24
Example 10 Solve x = 1.
dy =1 , at dx
Solution:
9 - 25
Solutions to systems of ODEs(*) Function desolve can be used to solve systems of ODEs, in combination with function atsolve to evaluate initial/boundary conditions. The general procedure consists of the following steps (Use the command kill(all) to clear Maxima's memory): 1 - Define the various differential equations that constitute the system by assigning them to variables, e.g., ode1, ode2, etc., for example: ode1 : 'diff(f(x), x) + f(x) = ; ode2 : 'diff(g(x),x) + g(x) = ; 2 Put together all the equations thus defined into a single variable, e.g., ode_syst : [ ode1, ode2, ... ]; 3 Use function atvalue to load initial/boundary conditions for the ODEs, e.g., atvalue( f(x), x = a, b); atvalue( g(x), x = c, d); 4 Call function desolve with the form: desolve(ode_syst, [f(x),g(x), ]), where f(x), g(x), , etc., are the functions we are solving for in the system of equations. The following examples were provided by Dr. Luigi Marino, Professor of Informatics and Mathematics, Liceo Camilo Golgi BRENO, Brescia, Italy.
9 - 26
031ode_systems.wxm
1 / 6
(%o1)
dx
g( x )+
dx 2
f( x )+ 3 f( x )= 15 %e -
(%o2)
dx
g( x )- 4
d x
f( x ) + 3 g( x )= 15 sin( 2 x )
(%o3) [
dx
g( x )+
dx 2
f( x )+ 3 f( x )= 15 %e -
2 2
,
dx
g( x )- 4
d x
f( x ) + 3 g( x )= 15 sin( 2 x )]
(%i4) atvalue (f(x), x=0, 35); (%o4) 35 (%i5) atvalue ('diff(f(x),x),x=0, -48); (%o5) - 48 (%i6) atvalue (g(x), x=0, 27); (%o6) 27 (%i7) atvalue ('diff(g(x), x), x=0, -55); (%o7) - 55 (%i8) desolve(ode_syst, [f(x), g(x)]); (%o8) [ f( x )= - 15 sin( 3 x )+ 2 cos( 2 x )+ 30 cos( x )+ 3 %e sin( x )- 3 %e
-x x
, g( x )= 30 cos( 3 x )+ sin( 2 x )- 60
(%o1)
dx
f( x )= m( x )+ g( x )- 3 f( x )
9 - 27
2 / 6
(%o2)
dx
g( x )= m( x )- 3 g( x )+ f( x )
(%i3) eq3:'diff(m(x),x)=f(x)+g(x)-3*m(x);
d
(%o3)
dx
m( x )= - 3 m( x )+ g( x )+ f( x )
(%i4) sist:[eq1,eq2,eq3];
d d d
(%o4) [
dx
f( x )= m( x )+ g( x )- 3 f( x ),
dx
g( x )= m( x )- 3 g( x )+ f( x ),
dx
m( x )= - 3 m( x )+ g( x )+
f( x )] (%i5) atvalue(f(x),x=0,1); (%o5) 1 (%i6) atvalue(g(x),x=0,2); (%o6) 2 (%i7) atvalue(m(x),x=0,-1); (%o7) - 1 (%i8) desolve(sist,[f(x),g(x),m(x)]);
2 %e -x %e -4x 2 %e -x 4 %e -4x 2 %e -x 5 %e -4x
(%o8) [ f( x )=
3
+
3
, g( x )=
3
+
3
, m( x )=
3
(%i9) wxplot2d([(2*%e^(-x))/3+%e^(-4*x)/3,(2*%e^(-x))/3+(4*%e^(-4*x))/3,(2*%e^(-x))/3-(5*%e^([y,-5,5], [gnuplot_preamble, "set grid;"])$ plot2d: expression evaluates to non-numeric value somewhere in plotting range. plot2d: expression evaluates to non-numeric value somewhere in plotting range. plot2d: expression evaluates to non-numeric value somewhere in plotting range.
(%t9)
9 - 28
031ode_systems.wxm
3 / 6
(%o10)
dx
f( x )= sin( x )+ g( x )+ f( x )
(%i11) eq2:'diff(g(x),x)=-f(x)+3*g(x);
d
(%o11)
dx
g( x )= 3 g( x )- f( x )
(%i12) sist:[eq1,eq2];
d d
(%o12) [
dx
f( x )= sin( x )+ g( x )+ f( x ),
dx
g( x )= 3 g( x )- f( x )]
(%i13) atvalue(f(x),x=0,-9/25);
9
(%o13) 25
(%i14) atvalue(g(x),x=0,-4/25);
4
(%o14) 25
(%i15) desolve(sist,[f(x),g(x)]);
13 sin ( x ) 9 cos ( x ) 3 sin ( x ) 4 cos ( x )
(%o15) [ f( x )= 25
25
, g( x )= 25
25
(%t16)
9 - 29
031ode_systems.wxm
4 / 6
(%o1)
dx 2
f( x )= - 3 g( x )- 4 f( x )
(%i2) eq2:'diff(g(x),x,2)=-8*f(x)-2*g(x);
d 2
(%o2)
dx 2
g( x )= - 2 g( x )- 8 f( x )
(%i3) sist:[eq1,eq2];
d 2 d 2
(%o3) [
dx 2
f( x )= - 3 g( x )- 4 f( x ),
dx 2
g( x )= - 2 g( x )- 8 f( x )]
(%i4) atvalue(f(x),x=0,3); (%o4) 3 (%i5) atvalue('diff(f(x),x),x=0,0); (%o5) 0 (%i6) atvalue(g(x),x=0,4); (%o6) 4 (%i7) atvalue('diff(g(x),x),x=0,0); (%o7) 0 (%i8) desolve(sist, [f(x), g(x)]); (%o8) [ f( x )= 3 cos( 2 3 / 2 x ), g( x )= 4 cos( 2 3 / 2 x )]
9 - 30
5 / 6
(%t9)
(%o1)
dx
f( x )= x sin( x )- g( x )
(%i2) eq2:'diff(g(x),x)=-f(x)+x*cos(x);
d
(%o2)
dx
g( x )= x cos( x )- f( x )
(%i3) sist:[eq1,eq2];
d d
(%o3) [
dx
f( x )= x sin( x )- g( x ),
dx
g( x )= x cos( x )- f( x )]
(%i4) atvalue(f(x),x=0,1); (%o4) 1 (%i5) atvalue(g(x),x=0,1); (%o5) 1 (%i6) desolve(sist, [f(x), g(x)]);
sin ( x ) %e x 3 %e -x cos ( x ) %e x 3 %e -x
(%o6) [ f( x )= 2
+
4
+
4
, g( x )= x sin( x )+
2
+
4
9 - 31
031ode_systems.wxm
6 / 6
(%i7) wxplot2d([-sin(x)/2+%e^x/4+(3*%e^(-x))/4,x*sin(x)+cos(x)/2-%e^x/4+(3*%e^(-x))/4], [x,-5, [y,-10,10] ,[gnuplot_preamble, "set grid;"])$ plot2d: expression evaluates to non-numeric value somewhere in plotting range. plot2d: expression evaluates to non-numeric value somewhere in plotting range.
(%t7)
(%i8) f1:-sin(t)/2+%e^t/4+(3*%e^(-t))/4;f2:t*sin(t)+cos(t)/2-%e^t/4+(3*%e^(-t))/4;
sin ( t ) %e t 3 %e -t
(%o8) 2
+
4
+
4 %e t 3 %e -t cos ( t )
(%o9) t sin( t )+
2
+
4
(%i10) wxplot2d([['parametric, f1, f2, [t, 0, 2], [nticks, 300]]], [x,0.45,0.78], [y,0.695,0.715], [gnuplot_preamble, "set grid;"])$
(%t10)
9 - 32
Converting higher order ODEs to a system of first-order ODEs A couple of examples presented earlier demonstrate that it is possible to solve higher-order ODEs using functions desolve and atvalue directly. It is also possible to convert a higherorder ODE into a system of first-order ODEs and solved the system as indicated in the section immediately above. To illustrate the second approach, consider the following equation:
d y dy d y 4 2 8 5 y =0 , 3 dx dx dx
3 2
subject to y(0) = 1, y'(0) = -1, y''(0) = 0.5. The equation can be written also as y''' = -5y 8y' 4y'', and the following substitutions made: u1 = y, u2 = y ' = u1', u3 = y'' = u2' Next, replace y''' with u3' = y''' in the ODE, together with the other variable replacements, to get: u3' = -5 u1 -8 u2 4 u3. The variable conversions defined above can be re-written as: u1' = u2, u2' = u3, which together with u3' = -5 u1 -8 u2 4 u3., produce the following system of first-order ODEs: u1' = u2 u2' = u3 u3' = -5 u1 -8 u2 4 u3. which can be written as a single, first-order, vector ODE:
u u2 d 1 u = u3 dx 2 u3 5 u18 u 2 4 u3
[ ][
The initial conditions get converted to u1(0) = 1, u2(0) = -1, u3 (0)= 0.5. The following Maxima commands show the solution to this system of equations, including plots of the three functions solved for, namely, u1, u2, and u3, representing the solution y(x) and its first two derivatives, respectively.
9 - 33
ThirdOrderToLinearSystem.wxm
1 / 3
(%o3)
dx
u1( x )= u2( x )
(%o4)
dx
u2( x )= u3( x )
(%o5)
dx
(%o6) [
dx
u1( x )= u2( x ),
dx
u2( x )= u3( x ),
dx
Replace the initial conditions: (%i7) atvalue(u1(x),x=0,1); (%o7) 1 (%i8) atvalue(u2(x),x=0,-1); (%o8) - 1 (%i9) atvalue(u3(x),x=0,0.5); (%o9) 0.5
Solve for the ODE system, store solution into variable 'solns':
9 - 34
2 / 3
(%o12) [ u1( x )= %e
11 x 2
cos
11 x 2
7 sin 6
11 x 2 11
cos
11 2
Extract solution components using function "rhs" (right-hand side): (%i14) wxplot2d(rhs(solns[1]),[x,-5,5], [y,-5,5],[gnuplot_preamble, "set grid;"])$ plot2d: expression evaluates to non-numeric value somewhere in plotting range.
(%t14)
9 - 35
ThirdOrderToLinearSystem.wxm (%i15) wxplot2d(rhs(solns[2]),[x,-5,5], [y,-5,5],[gnuplot_preamble, "set grid;"])$ plot2d: expression evaluates to non-numeric value somewhere in plotting range.
3 / 3
(%t15)
(%i16) wxplot2d(rhs(solns[3]),[x,-5,5], [y,-5,5],[gnuplot_preamble, "set grid;"])$ plot2d: expression evaluates to non-numeric value somewhere in plotting range.
(%t16)
9 - 36
Numerical solutions to ODEs Function rk Function rk (runge-kutta) is used to obtain the numerical solution of a single ODE or of a system of ODEs using a fourth-order Runge-Kutta numerical approach. Find information about function rk by opening the Maxima manual, using Help > Maxima Help, and typing rk in the index search box, then pressing [Enter]. The following information is provided: _______________________________________________________________________________
_______________________________________________________________________________ The following examples illustrate the use of rk for the numerical calculation of single ODEs or systems of ODEs. The single ODE or the system of ODEs must be represented by a firstorder equation of the form dx/dt = f(t,x). Follow the examples to understand the different functions involved in their solutions. The results of function rk are presented in the form of a list of points, each containing two or more elements. These lists can be manipulated to produce lists of points for plotting. Some of the list functions that you will see used in these examples include: makelist, first, second, third, length, and rest. Information on these functions is available through the Maxima manual (Help > Maxima Help). Select the Contents tab and find the Lists chapter. Click on it to open it, and then click on each of the two sections therein contained: Introduction to Lists, and Functions and Variables for Lists. Plots of the solutions are presented using functions wxplot2d or wxdraw2d (see Chapter 4).
9 - 37
05Modified_usage_rk_numeric_ode.wxm
1 / 24
All the examples presented below were provided by Dr. Luigi Marino, Professor of Informatics and Mathematics, Liceo "Camillo Golgi" BRENO, Brescia, Italy.
Example 1
dx/dt = t - x^2, x(0)=1, 0 < t < 8, Dt = 0.1
(%t3)
Prepare a list of values to plot using "wxdraw2d" from the "draw" package (%i4) sol_pts: makelist( rest(sol[i]),i,1,length(sol))$
9 - 38
2 / 24
(%t5)
Example 2
Cooling law: dx/dt = -k*(T-Ta) (%i6) kill(all); (%o0) done (%i1) dx/dt=-0.0866188656*(x-75);
dx
(%o1)
dt
= - 0.0866188656( x - 75 )
9 - 39
3 / 24
(%t4)
Example 3:
dy/dx = cos(x)+exp(sin(x)) (%i5) sol:rk(cos(x)*y+exp(sin(x)),y,3,[x,0,15,0.1])$ (%i6) wxdraw2d(grid=true,yrange=[-1,35],color=green,point_size=0.1,points_joined=true, points
(%t6)
05Modified_usage_rk_numeric_ode.wxm
4 / 24
dx/dt =4-x^2-4*y^2, dy/dt = y^2-x^2+1 x(0)=-1.25, y(0)=0.75, 0<t<4, Dt=0.02 (%i7) sol: rk([4-x^2-4*y^2,y^2-x^2+1],[x,y],[-1.25,0.75],[t,0,4,0.02])$
"sol1" = list of x-vs-t, "sol2" = list of y-vs-t, "sol3" = list of y-vs-x (%i8) sol1:makelist([first(sol[i]),second(sol[i])],i,1,length(sol))$ (%i9) sol2:makelist([first(sol[i]),third(sol[i])],i,1,length(sol))$ (%i10) sol3:makelist([second(sol[i]),third(sol[i])],i,1,length(sol))$
(%t12)
9 - 41
05Modified_usage_rk_numeric_ode.wxm (%i13)
5 / 24
wxdraw2d(grid=true,yrange=[-1,2],color=blue,point_size=0.1,points_joined=true, points
(%t13)
(%i14)
wxdraw2d(grid=true,yrange=[-1,2],color=green,point_size=0.1,points_joined=true, points
(%t14)
05Modified_usage_rk_numeric_ode.wxm (%i2) sol_m:transpose(sol)$ (%i3) sol_pts: makelist( rest(sol[i]),i,1,length(sol))$ (%i4) sol1:makelist([first(sol[i]),second(sol[i])],i,1,length(sol))$ (%i5) sol2:makelist([first(sol[i]),third(sol[i])],i,1,length(sol))$
6 / 24
(%t6)
9 - 43
05Modified_usage_rk_numeric_ode.wxm
7 / 24
(%t8)
(%t9)
9 - 44
05Modified_usage_rk_numeric_ode.wxm
8 / 24
(%t11)
(%t2)
9 - 45
05Modified_usage_rk_numeric_ode.wxm
9 / 24
(%t3)
(%o3)
9 - 46
05Modified_usage_rk_numeric_ode.wxm
10 / 24
(%t4)
(%t8)
9 - 47
05Modified_usage_rk_numeric_ode.wxm
11 / 24
(%t9)
(%o9)
9 - 48
05Modified_usage_rk_numeric_ode.wxm
12 / 24
(%t6)
(%t7)
9 - 49
05Modified_usage_rk_numeric_ode.wxm
13 / 24
(%t8)
(%t2)
(%i3) sol1:makelist([first(sol[i]),second(sol[i])],i,1,length(sol))$
9 - 50 (c) Gilberto Urroz / Luigi Marino - 2009
14 / 24
(%t5)
(%i6) sol3:makelist([first(sol[i]),fourth(sol[i])],i,1,length(sol))$
(%t7)
9 - 51
05Modified_usage_rk_numeric_ode.wxm
15 / 24
(%t8)
(%t9)
(%o9)
05Modified_usage_rk_numeric_ode.wxm (%i1) sol:rk([y,-sin(x)],[x,y],[0,1],[x,0,3.14159,0.1])$ (%i2) sol1:makelist([first(sol[i]),second(sol[i])],i,1,length(sol))$ (%i3) sol2:makelist([first(sol[i]),third(sol[i])],i,1,length(sol))$ (%i4) sol3:makelist([second(sol[i]),third(sol[i])],i,1,length(sol))$ (%i5) wxplot2d([discrete,sol1],[style,lines],[y,0,1.2], [gnuplot_preamble, "set grid;"]);
16 / 24
(%t5)
(%t6)
(%o6)
9 - 53
17 / 24
(%t7)
9 - 54
18 / 24
(%t5)
(%t6)
(%o6)
19 / 24
(%t2)
(%o2) (%i3) kill(all); (%o0) done (%i1) sol:rk([y,-5*y-6*x],[x,y],[1,0],[t,0,5,0.1])$ (%i2) sol1:makelist([first(sol[i]),second(sol[i])],i,1,length(sol))$ (%i3) sol2:makelist([first(sol[i]),third(sol[i])],i,1,length(sol))$ (%i4) sol3:makelist([second(sol[i]),third(sol[i])],i,1,length(sol))$
9 - 56
05Modified_usage_rk_numeric_ode.wxm
20 / 24
(%t5)
(%o5)
9 - 57
21 / 24
(%t4)
(%t6)
(%o6)
22 / 24
(%o2)
1000
(%o3) 10 (%o4) 5 (%i5) sol:rk([y,-(L+R*C^2)/(L*C*R)*y - 2/(L*C)*x+v/(L*C)], [x,y],[0,0],[t,0,0.1,0.001])$ (%i6) sol1:makelist([first(sol[i]),second(sol[i])],i,1,length(sol))$ (%i7) wxplot2d([discrete,sol1],[style,[points,1]],[y,0,3.4], [gnuplot_preamble, "set grid;"]);
(%t7)
9 - 59
23 / 24
(%t9)
(%t10)
9 - 60
24 / 24
(%t11)
>>
9 - 61
04Focault_pendulumNUmerical.wxm
1 / 3
9 - 62
04Focault_pendulumNUmerical.wxm
2 / 3
(%t10)
(%i11) sol2:makelist([first(sol[i]),third(sol[i])],i,1,length(sol))$ (%i12) sol3: makelist( rest(sol[i]),i,1,length(sol))$ (%i13) wxdraw2d( color=blue,title="y vs t",point_size=0,points_joined=true, points(sol2))$
(%t13)
9 - 63
04Focault_pendulumNUmerical.wxm
3 / 3
(%t14)
9 - 64