Examples
-
Input (in real mode):
fsolve([x^2+y+1,x+y^2-1],[x,y])
Output:
⎡
⎢
⎣ | 0.0 | −1.0 |
−0.453397651516 | −1.2055694304 |
| ⎤
⎥
⎦ |
- Input (in complex mode):
fsolve([x^2+y+1,x+y^2-1],[x,y])
Output:
⎡
⎢
⎢
⎢
⎣ | 0.0 | −1.0 |
0.226698825758−1.46771150871 i | 1.1027847152+0.665456951153 i |
0.226698825758+1.46771150871 i | 1.1027847152−0.665456951153 i |
−0.453397651516 | −1.2055694304 |
| ⎤
⎥
⎥
⎥
⎦ |
- Input (in any mode):
cfsolve([x^2+y+1,x+y^2-1],[x,y])
Output:
⎡
⎢
⎢
⎢
⎣ | 0.0 | −1.0 |
0.226698825758−1.46771150871 i | 1.1027847152+0.665456951153 i |
0.226698825758+1.46771150871 i | 1.1027847152−0.665456951153 i |
−0.453397651516 | −1.2055694304 |
| ⎤
⎥
⎥
⎥
⎦ |
- Input:
cfsolve([x^2+y+2,x+y^2+2],[x,y])
Output:
⎡
⎢
⎢
⎢
⎣ | 0.5+1.65831239518 i | 0.5−1.65831239518 i |
0.5−1.65831239518 i | 0.5+1.65831239518 i |
−0.5+1.32287565553 i | −0.5+1.32287565553 i |
−0.5−1.32287565553 i | −0.5−1.32287565553 i |
| ⎤
⎥
⎥
⎥
⎦ |
The methods are inherited from the GSL. The methods whose names end
with j_solver use the jacobian matrix, the rest use
approximations for the derivatives.
All methods use an iteration of Newton kind
The four methods hybrid*_solver use also a method of
gradient descent when the Newton iteration would make a too large of a
step. The length of the step is computed without scaling
for hybrid_solver and hybridj_solver
or with scaling (computed from f′(xn)) for
hybrids_solver and hybridsj_solver.
The rest of this section will cover the various method
options.