Solving Numerical & Algebraic Problems with Maxima Code
Classified in Physics
Written on in
English with a size of 5.12 KB
Numerical Methods for Solving Equations
1.1 Solving an Algebraic System
This code defines a function f(V) and then solves the system f([x,y,z]) = [x,y,z] to find its fixed points using the algsys command.
faux(x,y,z) := [(x^2)/2 + 1/3, x+y+z/4, x^2-y^2+(z^2)/4];
f(V) := faux(V[1], V[2], V[3]);
ecus : f([x,y,z]) - [x,y,z];
algsys(ecus, [x,y,z]), numer;1.2 Fixed-Point Iteration Method
This block implements the fixed-point iteration method. It starts with an initial guess (seed) and iteratively applies the function f until the norm of the difference between successive iterations is smaller than a given tolerance (10-14).
nor(V) := sqrt(V.V);
fpprec:100;
block(
semilla:[0,0,0],
while nor(f(semilla)-semilla) > 10^(-14) do
semilla:bfloat(... Continue reading "Solving Numerical & Algebraic Problems with Maxima Code" »