Numerical Solve
Returns the numerical solution of an equation or a system of equations.
Optionally, you can use a third argument to specify a guess for the solution or an interval within which it is
expected that the solution will occur.
Optionally, you can use a fourth argument to name the iterative algorithm to be used by the solver.
If you are solving for a single variable, your options for an iterative algorithm are bisection_solver,
newton_solver, and newtonj_solver. If you are solving for two variables, your only option is newton_solver.
fSolve(Eq,Var) or fSolve(Expr, Var=Guess)
Examples:
fSolve(cos(x)=x,x,-1..1) returns [0.739085133215]
fSolve([x
2
+y-2,x+y
2
-2],[x,y],[0,0]) returns [1.,1.]
Dierential Equation
Returns the solution to a dierential equation.
deSolve(Eq,[TimeVar],Var)
Example:
desolve(y''+y=0,y) returns G_0*cos(x)+G_1*sin(x)
ODE Solve
Ordinary Dierential Equation solver. Solves an ordinary dierential equation given by Expr, with variables
declared in VectrVar and initial conditions for those variables declared in VectrInit. For example,
odesolve(f(t,y),[t,y],[t0,y0],t1) returns the approximate solution of y'=f(t,y) for the variables t and y with initial
conditions t=t0 and y=y0.
odesolve(Expr,VectVar,VectInitCond,FinalVal,[tstep=Val,curve])
Example:
odesolve(sin(t*y),[t,y],[0,1],2) returns [1.82241255674]
Linear System
Given a vector of linear equations and a corresponding vector of variables, returns the solution to the system
of linear equations.
linsolve([LinEq1, LinEq2,…], [Var1, Var2,…])
Example:
linsolve([x+y+z=1,x-y=2,2*x-z=3],[x,y,z]) returns [3/2,-1/2,0]
Rewrite
lncollect
Rewrites an expression with the logarithms collected. Applies ln(a)+n*ln(b) = ln(a*b^n) for an integer n.
lncollect(Expr)
Example:
372 Chapter 22 Functions and commands
Komentarze do niniejszej Instrukcji