Matlab symbol limit, derivative and series summation

Source: Internet
Author: User

Author: Wang Flight, School of Transportation Engineering, Changsha University of Technology

1, the limit of the function

function:limit

function: The limit of the function to be obtained

Grammar:

Limit (f)

Limit (F,x,a)

Limit (f,x,a, ' right ')

Limit (F,x,a, ' left ')

Description: The first refers to the limit of the self-variable in the expression F to 0 , and the second refers to the limit of the independent variable x tending to a in the expression F, and the third refers to the right limit of the self-variable x in the expression F. The left limit of the expression F in the argument X tending to a .

Note: If Y=f (A,b,c,......) Ask A→n1,b→n2,c→n3 ... (N1,n2,n3 ... Represents a number) when the limit of Y is reached, the limit can be calculated in turn to obtain the final result. See Example 3

Example 1: Request

Syms N;    %SYMS declaration of the following variable is the symbolic variable y= (1+1/n) ^n; Limit (y,n,inf) ans =exp (1)

Example 2: Request

syms x; y=1/(x* (log (x)) ^2) -1/(x-1) ^2;  %log is lnlimit (y,x,1,'right')

The results can be as follows:

Ans =

1/12

Example 3:

>> syms x;>> syms y;>> z=x^2+1/y;>> z=limit (z,x,1);>> z=limit (z,y,2)

You can get the result

z =

3/2

2, the symbol summation of the series

The most common form of progression, as shown below.

S: Sum of series

I: independent variable, the range is [a, b]

F (i): For the function of the argument I

function:symsum

function: Sum of series symbols

Syntax:symsum (S)

Symsum (S,V)

Symsum (S,A,B)

Description: the function symsum (s) in S is a symbolic expression, S is relative to the ampersand variable K's and, K takes value from 0 to k-1. function Symsum (s,v) specifies s relative to the variable V and V from 0 to V-1. The function symsum (s,a,b) and Symsum (s,v,a,b) specify symbolic expressions to accumulate from v=a to v=b.

Cases:

Syms v fa = 1;b = 100;f = v^2; S = Symsum (f,v,a,b)

The result of the calculation is:

S = 338350

3, the derivation of the polynomial

function 1:polyder

function: derivation of polynomial or rational polynomial

Syntax:polyder (A)

Description: A is a polynomial matrix and a derivative of a.

Example: Derivation of f (x) =x4+2x3+3x2+1

A = [1,2,3,0,1]  % writes the polynomial matrix, the middle lacks the power to use 0 complete                         %, attention must be from the high write to the lower times, cannot miss the item P = Polyder (A)  % The result obtained here is also the polynomial matrix

function 2:fminsearch

function: starting from an initial value, find the minimum value of a scalar function

syntax:x= fminsearch (fun,x0)

Description: starting from x0, find the local minimum value of the function fun

Example: function Y=x2+4, when the x value is how large, Y has local minimum value

x0 = -2;a = Fminsearch (@ (x) (x^2+4), x0)

  

  

Matlab symbol limit, derivative and series summation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.