Pages created and updated by
Terry Sturtevant
Date Posted:
March 27, 2015
Maple Kirchhoff's Law Tutorial
Maple is a commercial program.
It is a computer algebra system (CAS) like
Maxima or Mathematica.
There are various tutorials out there on how to use Maple; this one
is designed to focus on its use for circuit analysis; i.e. lots of
use of Kirchhoff's Laws, and including complex numbers for AC
analysis with capacitors and inductors.
Sample DC Circuit
Here is a simple circuit:
It gives us the following three Kirchhoff's Law
equations
(
See the complete analysis here.
)
:
I
_{1} R
_{1} +
I
_{3} R
_{3} =
V
_{1}
I
_{2} R
_{2}
I
_{3} R
_{3} =
V
_{2}
I
_{1} +
I
_{2}
I
_{3} = 0
A computer algebra system can be very useful for analyzing
circuits like this.











Opening Maple:
 Open Maple from the menu or the desktop icon.

Solving Equations:

To solve a set of Kirchhoff's Law equations, use the
solve command, solving for
I_{1},
I_{2},
and I_{3}:
At the prompt, type in the the commands as shown:
The solve command gives
the solution vector.
 The solution is a vector of currents.
We can pick off a single current by using an
index with the previous result:
 You can substitute in specific component values:
If numbers are not integers, results will also be
noninteger
Note that as soon as we use scientific notation, values
become noninteger.
 We can get the voltage across a resistor by multiplying
the current times the resistance, and assigning it to a new
variable:
Important tip: To combine two elements of two different
arrays of the same size,
just put a tilde after whatever operation you choose
(such as +, , etc.).

Saving a Session:
 This allows you to come back to it later with all
of the variables the same.
To save a session:

Quitting Maxima:
 Quitting maxima:
Choose Exit from the menu.

Loading a Previous Session:
 It's nice to be able to pick up where you left off, so you can
keep developing
an analysis over time.
To load a previous session:
Everything should be as you left it.
 Previous statements can be reexecuted and/or edited.
 Statements can be reevaluated with different numbers.

Redefining Variables:
 Variables can be changed.

Getting Resistor Voltages:
 We can pick off individual current equations as well as
just the results for each current:

Using Phasors:
 You can use phasors for circuits where there are
capacitors
and inductors.
So for an inductor
Z_{l} = i ω L
and for a capacitor
Z_{C} = 1/( i ω C):

Getting DC and High Frequency
Limits:
Taking the limit as the frequency goes to zero will give the
DC behaviour of a circuit;
taking the limit as the frequency goes to infinity will give
the
high frequency behaviour of a circuit.

Links: