2.3.1 Symbolic calculus
Find the Limit
Limit (F,x,a) for x in F (x) to approximate the limits of a
For example:
>> clear>> syms k x>> lim_t=limit ((1-1/x) ^ (k*x), x,inf) lim_t = 1/exp (k)
Derivative number
diff (F,x,n) to find n-derivative of f (x)
>> clear>> syms x>> dfdx=diff (x^3,x,1) DFDX = 3*x^2
Note that the Findsym acknowledgement is automatically called when X is default on the upper formula, and N defaults to the default N=1
There are also several functions:
Jacobian (f,v) The Jacobian matrix of the multivariate vector function f (v) (Advanced)
Taylor (F,n,x,a) expands f (x) into a power series (Taylor series) at X=a
Symbolic summation of 2.3.2 sequences/series
S=symsum (F,x,a,b) asks F (x) from A to B and
X Findsym is automatically confirmed by default, and a, B can default to [0,x-1]
When F is a matrix, the sum will be individually
>> clear>> syms t k>> f=[t,k^3];>> s=simple (Symsum (f)) s = [T^2/2-T/2, K^3*t]
2.3.3 Symbol integral
Int (f,x) to calculate indefinite integral of f (x) dx
int (f,x,a,b) definite integral from A to B
Similarly, x default findsym automatically confirms that a, B can be any value or symbol expression
>> clear>> syms x>> f=sqrt ((x+1)/x)/x;>> S=int (f,x), S=simple (s) s =-(1/x + 1) ^ (a)-2*atan (( 1/x + 1) ^ (*i) *i s =-2*atan (1/x + 1) ^ ((1/x + 1) ^ () *i) *i
。。 The result is how the whole complex.
Matrix Quadrature
>> clear>> syms a b x>> f=[a*x,b*x^2;1/x,sin (x)];>> disp (' The ANS is '); the ANS is>> int (f) A NS = [(a*x^2)/2, (b*x^3)/3][ log (x), -cos (x)] >> Pretty (int (f)) +- -+ | 2 3 | | A x b x | | ----, ---- | | 2 3 | | | | Log (x),-cos (x) | +- -+
Feel pretty () a bit uglier.
You can also ask for multiple integrals.
>> clear>> syms x y>> int (int (x*y,y,2,3), x,1,2) ans = 15/4
MATLAB Learning Note (iii): Symbolic calculation _-_2