Lecture Notes Linear Differential Equations 4664 Introduction Falling Cat 1 st

Lecture notes linear differential equations 4664

This preview shows page 12 - 14 out of 16 pages.

Lecture Notes – Linear Differential Equations — (46/64) Introduction Falling Cat 1 st Order Linear DEs Examples Pollution in a Lake Example 2 Mercury in Fish Modeling Mercury in Fish Least Squares Error with MatLab Define a MatLab function for the sum of square errors between the data and the model L ( t ; L * , b ) = L * ( 1 - e - bt ) 1 function J = sumsq vonBert (p , tdata , ldata ) 2 % Function computing sum of square e r r o r s f o r von B e r t a l a n f f y model 3 model = p (1) * (1 - exp ( - p (2) * tdata ) ) ; 4 e r r o r = model - ldata ; 5 J = e r r o r * error ’ ; 6 end If the data are stored in tdfish and ldfish , then apply the MatLab function fminsearch with function sumsq vonBert 1 [ p1 , J , f l a g ] = fminsearch ( @sumsq vonBert , [ 1 0 0 , 0 . 1 ] , [ ] , t d f i s h , l d f i s h ) The result are the best fitting parameters L * = 92 . 401 and b = 0 . 14553 Joseph M. Mahaffy, h [email protected] i Lecture Notes – Linear Differential Equations — (47/64) Introduction Falling Cat 1 st Order Linear DEs Examples Pollution in a Lake Example 2 Mercury in Fish Modeling Mercury in Fish Graph of Length of Lake Trout Graph for Length of Lake Trout: Shows data and best fitting von Bertalanffy model 0 2 4 6 8 10 12 14 16 18 20 0 10 20 30 40 50 60 70 80 90 100 Age (Years) Length (cm) Length of Lake Trout Joseph M. Mahaffy, h [email protected] i Lecture Notes – Linear Differential Equations — (48/64)
Image of page 12

Subscribe to view the full document.

Introduction Falling Cat 1 st Order Linear DEs Examples Pollution in a Lake Example 2 Mercury in Fish Modeling Mercury in Fish Lake Trout Data for Weight vs Length Lake Trout Data for Weight vs Length (Lake Superior, 1997) length Weight length Weight length Weight length Weight (cm) (g) (cm) (g) (cm) (g) (cm) (g) 29.0 200 57.7 1520 69.6 2800 78.5 3500 51.8 1600 58.9 1600 71.4 3050 80.3 4500 54.9 1450 58.9 1800 75.2 3920 83.8 5000 55.4 1300 60.2 2200 75.4 3980 85.6 4350 56.6 1350 62.5 1800 76.5 3980 86.6 4500 56.6 1660 68.1 3400 78.5 3629 87.4 4650 57.4 1550 Find the best fitting allometric model W ( L ) = kL a for some parameters k and a Joseph M. Mahaffy, h [email protected] i Lecture Notes – Linear Differential Equations — (49/64) Introduction Falling Cat 1 st Order Linear DEs Examples Pollution in a Lake Example 2 Mercury in Fish Modeling Mercury in Fish Allometric Models 1 Allometric Models: Relationship between Length and Weight of Lake Trout using a Power Law Relationship W ( L ) = kL a Examine 3 versions of the Allometric or Power Law model Best fit through the logarithms of the data Nonlinear least squares best fit Dimensional analysis modeling This is algebraic and not a differential equation Dimensional considerations important in differential equations Show a variety of MatLab programming methods Joseph M. Mahaffy, h [email protected] i Lecture Notes – Linear Differential Equations — (50/64) Introduction Falling Cat 1 st Order Linear DEs Examples Pollution in a Lake Example 2 Mercury in Fish Modeling Mercury in Fish Allometric Models 2 Logarithm of Allometric Model: W ( L ) = kL a ln( W ) = a ln( L ) + ln( k ) Let y = ln( W ) be the dependent variable and x = ln( L ) be the independent variable With b = ln( k ) this logarithmic form is a linear relation, y = ax + b Easy formulas for finding a and b for data y vs x Take logarithms of the length and weight data, ln( L ) and ln( W ) Use MatLab to find linear least squares fit to these logarithmic data Obtain Allometric model
Image of page 13
Image of page 14
  • Fall '08
  • staff

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes