Linear algebra & ODE track

This track shows how Maple can support matrix computations, eigenvalue problems, and ordinary differential equations, including simple systems and phase portraits.

🧮 Matrix computations with LinearAlgebra 🧠 ODE solving with dsolve & DEtools 📊 Visualising trajectories and behaviour
Topic L1
Matrices, vectors, and LinearAlgebra

The LinearAlgebra package turns many pages of algebra into a few commands. Always start by loading it:

with(LinearAlgebra):

Basic objects:

  • A := Matrix([[1,2],[3,4]]);
  • b := Vector([5,6]);
  • A . b; (matrix–vector product)
Example: solving a linear system
with(LinearAlgebra):

A := Matrix([[2,1],[1,3]]);
b := Vector([5,7]);

x := LinearSolve(A, b);

Compare this with solving the same system by hand. Maple’s answer can be written in vector form or as separate coordinates.

🎓 Mirrors standard “solve Ax = b” tasks in UI linear algebra courses
Topic L2
Eigenvalues, eigenvectors, and diagonalisation

Eigenvalues and eigenvectors show how a matrix stretches space. Maple can compute them quickly:

  • Eigenvalues(A);
  • Eigenvectors(A);
Example: a 2×2 matrix with distinct eigenvalues
with(LinearAlgebra):

A := Matrix([[4,1],[2,3]]);
Eigenvalues(A);
Eigenvectors(A);

After computing these in Maple, try computing the characteristic polynomial by hand, then check that Maple’s eigenvalues match your calculation.

Example: Jordan form
with(LinearAlgebra):

A := Matrix([[2,1],[0,2]]);
P, J := JordanForm(A, output = ['P','J']);

This is more advanced but can appear in higher-level courses or projects linked with dynamics.

🎓 Useful for spectral decompositions and systems of ODEs
Topic O1
Solving basic ODEs with dsolve

Maple’s dsolve command covers many textbook differential equations:

  • First-order separable, linear, exact equations.
  • Second-order equations with constant coefficients.
  • Systems of first-order equations.
Example: first-order linear ODE
de := diff(y(x), x) + y(x) = exp(-x);
dsolve(de, y(x));
Example: with an initial condition
de_ic := { diff(y(x), x) + y(x) = exp(-x), y(0) = 2 };
dsolve(de_ic, y(x));
🎓 Directly linked to UI ODE courses and ODE–Integration Bee prep
Topic O2
Visualising solution curves and slope fields

The DEtools package contains DEplot, which you can use to plot solution curves and slope fields.

with(DEtools):

de := diff(y(x), x) = x - y(x);

DEplot(de, y(x), x = -2..2, y = -4..4);
Example: families of solutions
with(DEtools):

de := diff(y(x), x) = y(x);

DEplot(de, y(x), x = -2..2, y = -3..3,
       arrows = medium,
       linecolor = black);

In tutorials, you can compare this to sketches students make by hand for the same equation.

Matrix & ODE “bridge” examples

Linear algebra and ODEs meet when you study systems like x'(t) = A x(t). Maple lets you explore this bridge explicitly.

System: x'(t) = Ax

For a 2×2 matrix with distinct eigenvalues:

with(LinearAlgebra):

A := Matrix([[1,2],[-2,1]]);
Eigenvalues(A);

Solution form

Write the system as:

de := { diff(x1(t),t) = 1*x1(t) + 2*x2(t),
       diff(x2(t),t) = -2*x1(t) + 1*x2(t) };

Then ask Maple for dsolve with initial conditions.

Phase portrait ideas
For projects & mini-seminars

Once students are comfortable with DEplot, you can invite them to:

  • • Classify equilibria of simple 2D systems by looking at eigenvalues of the matrix.
  • • Compare hand-drawn phase portraits to Maple plots.
  • • Explore how changing a parameter in the matrix affects trajectories.
For tutors

When running a Maple–linear algebra or Maple–ODE lab:

  • • Start with a matrix or ODE that already appeared in lectures.
  • • Show how Maple confirms the result.
  • • Then choose a slightly more complicated example that is easier in Maple than by hand.

The goal is that students see Maple as a partner: a way to test linear algebra and ODE ideas, not a black box.