chapter 11: symbolic computing for calculus matlab for scientist and engineers using symbolic...
TRANSCRIPT
![Page 1: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/1.jpg)
Chapter 11:
Symbolic Computing for Calculus
MATLAB for Scientist and Engineers
Using Symbolic Toolbox
![Page 2: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/2.jpg)
2
You are going to See that MuPAD does calculus as we do Analyze functions by their plots, limits and
derivatives Be glad that MuPAD does all complex inte-
grations and differentiation for you.
![Page 3: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/3.jpg)
3
Differentiation: Definition
Definition
Differentiation by Definition
![Page 4: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/4.jpg)
4
Functions and Expressions
On Functions On Expressions
![Page 5: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/5.jpg)
5
Multiple Derivatives
Derivative of Symbolic Functions
Multiple Derivatives
Hold actual evaluations
$: Sequence Operator
![Page 6: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/6.jpg)
6
Value of Derivative at a Point
Functions
Expressions
![Page 7: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/7.jpg)
7
Multivariate Functions
![Page 8: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/8.jpg)
8
Multivariate Functions (cont.)
Partial Derivatives on x and y
Partial Derivatives on 1st variable
Partial Derivatives on 1st and 2nd variables
![Page 9: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/9.jpg)
9
Jacobian
Partial derivatives
( , , )
( , , )
x y zJ
r u v
![Page 10: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/10.jpg)
10
Exercise
Consider the function f : x → sin(x) /x. Com-pute first the value of f at the point x = 1.23, and then the derivative f′(x).
Why does the following input not yield the de-sired result?
f := sin(x)/x: x := 1.23: diff(f, x)
![Page 11: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/11.jpg)
11
Exercise
De l’Hospital’s rule states that
Compute by applying this rule
interactively. Use the function limit to check
your result.
![Page 12: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/12.jpg)
12
Exercise
Determine the first and second order partial derivatives of f1(x1, x2) = sin(x1 x2) .
Let x = x(t) = sin(t), y = y(t) = cos(t), and
f2(x, y) = x2 y2.
Compute the derivative of f2(x(t), y(t)) with re-spect to t.
![Page 13: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/13.jpg)
13
Limit
Limit
![Page 14: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/14.jpg)
14
Left and Right Limit
![Page 15: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/15.jpg)
15
Other Limits
Conditional Limits
Intervals
![Page 16: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/16.jpg)
16
Exercise
Use MuPAD to verify the following limits:
![Page 17: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/17.jpg)
17
Integration
Definite and Indefinite Integrations
![Page 18: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/18.jpg)
18
Numeric Integration
No Symbolic Solution
![Page 19: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/19.jpg)
19
Integration with Real Parameters
Use assume to set attributes of parameters.
![Page 20: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/20.jpg)
20
Exercise
Compute the following integrals:
Use MuPAD to verify the following equality:
![Page 21: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/21.jpg)
21
Exercise
Use MuPAD to determine the following indef-inite integrals:
![Page 22: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/22.jpg)
22
Exercise The function intlib::changevar performs a change
of variable in a symbolic integral. Read the correspond-ing help page. MuPAD cannot compute the integral
Assist the system by using the substitution t = sin(x). Compare the value that you get to the numerical result returned by the function numeric::int.
![Page 23: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/23.jpg)
23
Sum of Series
![Page 24: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/24.jpg)
24
Exercise Use MuPAD to verify the following identity:
Determine the values of the following series:
![Page 25: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/25.jpg)
25
Calculus Example
Asymptotes, Max, Min, Inflection Point
Look at the overall characteristicsof the function.
![Page 26: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/26.jpg)
26
Asymptotes
Horizontal
Vertical
![Page 27: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/27.jpg)
27
Min and Max
Roots of the Derivative
![Page 28: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/28.jpg)
28
Inflection Point
Roots of the Second Derivative
![Page 29: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/29.jpg)
29
Putting All Together
Display the findings about the function.
![Page 30: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/30.jpg)
30
Key Takeaways
Now, you are able to find limit with optional left, and right approaches, get derivatives of functions and expressions, analyze functions by finding their asymptotes,
maxima and minima, and to get definite and indefinite integrals of arbi-
trary functions.
![Page 31: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/31.jpg)
31
Notes
limit(f(x),x=infinity) diff(sin(x^2)^2,x)
diff(sin(x^2)^2,x $ 3)
hold(expr)
reset()f := x -> x^2*sin(x)
f'(x) PIlimit(1/x, x=0, Right)
int(sin(x),x=0..PI) int(x^n,x) assuming n <> -1assume(a>0)
sum(k^2,k=1..n) simplify(expr)sum(x^n/n!,n=0..infinity
numer(expr) op(sol,[2,1,1])solve(expr)
plot::Line2d([x1,y1],[x2,y2]) plot::PointList2d( [[x1,x2],..])
D([1,2],f)
denom(expr)
![Page 32: Chapter 11: Symbolic Computing for Calculus MATLAB for Scientist and Engineers Using Symbolic Toolbox](https://reader036.vdocuments.net/reader036/viewer/2022081418/56649c765503460f9492a0b4/html5/thumbnails/32.jpg)
32
Notes