Calculus Review - PowerPoint PPT Presentation

About This Presentation
Title:

Calculus Review

Description:

Calculus Review GLY-4822 Integral Calculus: Special Case Integral Calculus: Special Case Slope Slope = rise/run = Dy/Dx = (y2 y1)/(x2 x1) Order ... – PowerPoint PPT presentation

Number of Views:176
Avg rating:3.0/5.0
Slides: 36
Provided by: MikeSu154
Learn more at: https://faculty.fiu.edu
Category:
Tags: calculus | review

less

Transcript and Presenter's Notes

Title: Calculus Review


1
Calculus Review
2
Slope
  • Slope rise/run
  • Dy/Dx
  • (y2 y1)/(x2 x1)
  • Order of points 1 and 2 not critical, but keeping
    them together is
  • Points may lie in any quadrant slope will work
    out
  • Leibniz notation for derivative based on Dy/Dx
    the derivative is written dy/dx

3
Exponents
  • x0 1

4
Derivative of a line
  • y mx b
  • slope m and y axis intercept b
  • derivative of y axn b with respect to x
  • dy/dx a n x(n-1)
  • Because b is a constant -- think of it as bx0 --
    its derivative is 0bx-1 0
  • For a straight line, a m and n 1 so
  • dy/dx m 1 x(0), or because x0 1,
  • dy/dx m

5
Derivative of a polynomial
  • In differential Calculus, we consider the slopes
    of curves rather than straight lines
  • For polynomial y axn bxp cxq
  • derivative with respect to x is
  • dy/dx a n x(n-1) b p x(p-1) c q x(q-1)

6
Example
y axn bxp cxq
dy/dx a n x(n-1) b p x(p-1) c q x(q-1)

7
Numerical Derivatives
  • slope between points

8
Derivative of Sine and Cosine
  • sin(0) 0
  • period of both sine and cosine is 2p
  • d(sin(x))/dx cos(x)
  • d(cos(x))/dx -sin(x)

9
Partial Derivatives
  • Functions of more than one variable
  • Example C(x,y) x4 y3 xy

10
Partial Derivatives
  • Partial derivative of h with respect to x at a y
    location y0
  • Notation ?h/?xyy0
  • Treat ys as constants
  • If these constants stand alone, they drop out of
    the result
  • If they are in multiplicative terms involving x,
    they are retained as constants

11
Partial Derivatives
  • Example
  • C(x,y) x4 y3 xy
  • ?C/? xyy0 4x3 y0

12
WHY?
13
Gradients
  • del h (or grad h)
  • Flow (Darcys Law)

14
Gradients
  • del C (or grad C)
  • Diffusion (Ficks 1st Law)

15
Basic MATLAB/Python
16
Matlab/Python
  • Programming environment
  • Post-processer
  • Graphics
  • Analytical solution comparisons
  • Use File/Preferences/Font to adjust interface
    font size

17
Vectors/Lists and tuples
  • gtgt a1 2 3 4
  • a
  • 1 2 3 4
  • gtgt a'
  • ans
  • 1
  • 2
  • 3
  • 4

18
Autofilling and addressing Vectors
  • gt a10.23'
  • a
  • 1.0000
  • 1.2000
  • 1.4000
  • 1.6000
  • 1.8000
  • 2.0000
  • 2.2000
  • 2.4000
  • 2.6000
  • 2.8000
  • 3.0000
  • gtgt a(23)
  • ans

19
xy Plots
  • gtgt x1 3 6 8 10
  • gtgt y0 2 1 3 1
  • gtgt plot(x,y)

20
Matrices
  • gtgt b1 2 3 45 6 7 8
  • b
  • 1 2 3 4
  • 5 6 7 8
  • gtgt b'
  • ans
  • 1 5
  • 2 6
  • 3 7
  • 4 8

21
Matrices
  • gtgt b2.2ones(4,4)
  • b
  • 2.2000 2.2000 2.2000 2.2000
  • 2.2000 2.2000 2.2000 2.2000
  • 2.2000 2.2000 2.2000 2.2000
  • 2.2000 2.2000 2.2000 2.2000

22
Reshape
  • gtgt a19
  • a
  • 1 2 3 4 5 6 7 8
    9
  • gtgt bsquarereshape(a,3,3)
  • bsquare
  • 1 4 7
  • 2 5 8
  • 3 6 9
  • gtgt

23
Load
  • a load(filename) (semicolon suppresses echo)

anp.loadtxt('book3.csv',delimiter',')
24
If
  • if(1)
  • else
  • end

25
For
  • for i 110
  • end

26
BMP Output
  • bsqrand(100,100)
  • bmp1 output
  • e(,,1)1-bsq r
  • e(,,2)1-bsq g
  • e(,,3)ones(100,100) b
  • imwrite(e, 'junk.bmp','bmp')
  • image(imread('junk.bmp'))
  • axis('equal')

27
Quiver (vector plots)
  • gtgt scale10
  • gtgt drand(100,4)
  • gtgt quiver(d(,1),d(,2),d(,3),d(,4),scale)

28
Contours
  • h
  • Contour(h)
  • Or Contour(x,y,h)

29
Contours w/labels
  • C
  • c,dcontour(C)
  • clabel(c,d), colorbar

30
Numerical Partial Derivatives
  • slope between points
  • MATLAB
  • h (order assumed to be low y on top to high y
    on bottom!)
  • dhdx,dhdygradient(h,spacing)
  • contour(x,y,h)
  • hold
  • quiver(x,y,-dhdx,-dhdy)

31
Gradient Function and Streamlines
  • dhdx,dhdygradient(h)
  • Stream stream2(X,Y,U,V,STARTX,STARTY)
  • Stream stream2(-dhdx,-dhdy,51100,50ones(50,
    1))
  • streamline(Stream)
  • (This is for streamlines starting at y 50 from
    x 51 to 100 along the x axis. Different
    geometries will require different starting
    points.)

32
Stagnation Points
33
Integral Calculus
34
Integral Calculus Special Case
35
Integral Calculus Special Case
Write a Comment
User Comments (0)
About PowerShow.com