Differentiation, MATLAB in Mathematics


The derivative of a function y = f(x) can be written as follows


or f  '(x) and is defined as the rate of change of the dependent variable y with respect to x. The derivative is the slope of line tangent to the function at given point.

The MATLAB has a function polyder that will find the derivative of a polynomial. For illustration, for the polynomial x3 + 2x2 - 4x + 3, that would be represented by the vector

 [1 2 - 4 3], the derivative is found by:

>> origp = [1 2 -4 3];

>> diffp = polyder(origp)

diffp =

3 4 -4

that shows that the derivative is the polynomial 3x2 + 4x - 4. The function polyval can be used then to find the derivative for certain values of x; for illustration for x = 1, 2, and 3:

>> polyval(diffp, 1:3)

ans =

3 16 35

The derivative can be written as folows 


and can be approximated by difference equation.

Posted Date: 10/22/2012 8:59:42 AM | Location : United States

Related Discussions:- Differentiation, Assignment Help, Ask Question on Differentiation, Get Answer, Expert's Help, Differentiation Discussions

Write discussion on Differentiation
Your posts are moderated
Related Questions
Using Functions with the Vectors and Matrices: As MATLAB is written to work with the vectors and matrices, the whole vector or matrix can be passed as an argument to the funct

Labels and Prompts: The script loads all the numbers from file into a row vector. It then splits the vector; it stores the initial element that is the experiment number in a v

Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer

fprintf function - File function: The fprintf function really returns the number of bytes which was written to the file, therefore if you do not want to see that number, suppr

Indexed empty matrix: The Individual elements cannot be eliminated from matrices, as matrices always have the similar number of elements in every row. >> mat = [7 9 8; 4 6

Example of Recursive functions: This definition is recursive as a factorial is defined in terms of the other factorial. There are two parts to any recursive definition: the co

Writing to Files: There are many lower level functions which can write to files. We will focus on the fprintf function that can be used to write a file and also to append to a

Empty Vectors: An empty vector or in another words, a vector which stores no values, can be generated using the empty square brackets: >> evec = [] evec = [] >> lengt

Three-dimensional pie and bar: For the bar3 function, x & y vectors are passed and the function displays three-dimensional bars as shown in figure: Figure: Three-dimen

Strings as Vectors: The Strings are considered as vectors of characters-or in another words, a vector in which each and every element is a single character-so numerous vector