App2_diff_int - respect to x To find definite and indefinite integral of a function int command is used in MATLAB Example Find integral of x^2 2

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Contents: - Differentiation. - Integration - hw Differentiation Derivative of a function can be taken using diff command. Write help sym/diff at command window to see more details about. Example: Take first and second derivative of the following function using MATLAB. f(x)=2*x^3+8*x^2 Soln: First define x and f as symbolic variable by writing >> syms f x later define given function >>f=2*x^3+8*x^2 and use diff command to take first derivative >> diff(f,1) to take second derivative use >> diff(f,2) Integration If the function f(x) is a derivative, then the set of all antiderivatives f is the indefinite integral of f with
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: respect to x. To find definite and indefinite integral of a function int command is used in MATLAB. Example: Find integral of x^2+2 using MATLAB. Soln: First define x symbolic variable by writing >> syms x and find indefinite integral using >> int(x^2+2) to find definite integral between x=2 and x=5, we can write >> int(x^2+2,1,5) hw: 1- Take derivative of the following functions with respect to z (Hint: Use help sym/diff command to learn taking derivative to respect to a variable) a- f=x*z+2*z^2+x^2 b- f=sin(x*z)+x-z 2- Take definite integral of the following functions a- f(x)=x+2*x^2 b- f(x)=sin(x)...
View Full Document

This note was uploaded on 11/24/2009 for the course ELECTRICAL 1512200540 taught by Professor Ahmetyazıcı during the Fall '09 term at Eskişehir Osmangazi Üniversitesi.

Ask a homework question - tutors are online