Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Lab 7: Understanding Instantaneous Rates of Change through Derivatives, Lab Reports of Linear Algebra

In this document, students are introduced to the concept of derivatives and their application in modeling functions that change at varying rates. The calculation of derivatives using matlab and provides examples of population growth and blood flow. Students will learn how to express functions and compute their derivatives in matlab, as well as interpret the results in the context of real-world scenarios.

Typology: Lab Reports

Pre 2010

Uploaded on 08/26/2009

koofers-user-90i
koofers-user-90i 🇺🇸

10 documents

1 / 6

Toggle sidebar

Related documents


Partial preview of the text

Download Lab 7: Understanding Instantaneous Rates of Change through Derivatives and more Lab Reports Linear Algebra in PDF only on Docsity! Laboratory 7 Introduction to the Derivative In a previous lab, we investigated how to create a linear model of data that was gathered. Similar methods exist to help model other types of functions. In this lab we will investigate rates at which these functions change. We know that the average rate of change for a function f(x) over a particular interval [a,b] is given by: ab afbf   )()( For instance, if a car traveled on the interstate from mile marker 25 at 6:00 to mile marker 125 at 8:00, then the average velocity of the car over this strech of road would be given by (125-25) / (8 – 6) = 50 mi/hr. As you have learned in calculus, rather than giving us average change, the derivative gives us the instantaneous rate of change. In our example above, the derivative of the position function would tell us the rate at which the car's position is changing with respect to time, or instantaneous velocity. So if our position function above were called s(t), and we knew that the derivative at t=7, s'(7) = 70, then this means at 7:00, the car was traveling at a rate of 70 mi/hr. In this lab, we will look at examples of biological models and interpret the derivatives involved. We will use MATLAB to compute the derivatives of functions, help us graph our functions and their derivatives, and to answer questions about the derivative. 1. Population growth: The exponential model Suppose that a bacterial population is doubling every hour and has a population given by ttp 2100)(  , where t is measured in hours and p is measured in number of bacterial cells. How fast is this bacteria culture growing after 4 hours? To start, we need to know how to express a function and compute its derivative in MATLAB. In order to do this, we introduce some symbolic notation. In our first command we use the syms command to declare any symbolic variables we will have in our equation. Since t is our only independent variable, it is the only one we need to declare. We can then express our equation and perform any calculus manipulation on it, as long as it is supported by MATLAB. Below, we use the diff function to differentiate our function )(tp [stored in MATLAB as dp_dt ]. 1 clear syms t p_t = 100*2^t dp_dt = diff(p_t,t) These results show that ttp 2)2log(100)('  . Note that )()2log()(' tptp  . This is true whenever the population, )(tp , is modeled as an exponential function. Let us next graph )(tp and )(' tp . fplot('[100*2^t,100*log(2)*2^t]',[0,5]) xlabel('time in hours') ylabel('Population') legend('p(t)','dpdt',0) title('Population versus Time') 2 Syntax: syms x1 x2 Output: None Description: Declares x1 and x2 as symbolic objects. Syntax: diff(f) Output: the derivative of f Description: Computes the derivative of f with respect to x, if f is an expression in the symbolic variable x. Syntax: diff(f,t) Output: the derivative of f with respect to the variable t Description: Computes the derivative of f with respect to t, if f is an expression in the symbolic variable t . This is used when there is more than one symbolic variable. eta =.027; R=.008; l=2; P=4000; v1=subs(v) In the second stage, we plug in the values for 'eta, R, l' and 'P'. Thus, v1 becomes a symbolic expression in only one variable 'r'. So the velocity of the blood at a particular radiur r from the center of the blood vessel is given by the above equation. We can now substitute any value of r into the equation to find v1. For example, at the center of the blood vessel, the radius is 0, so we substitute into the equation of v1, r =0 as follows: subs(v1,r,0) Notice that this means that the blood at the center of the blood vessel is flowing at a speed of 1.1852 cm/sec. We can convert this to m using the conversion 1 cm = 10,000 m. This means that the blood is moving at a rate of 11,852  m/s. Lets look at what's happening at a distance of 20  m from the center. We already have our equation, so we just neet to substitute our value in. Since the variables in the equation are in cm, we convert the r =20  m to r = 0.002 cm. subs(v1,r,0.002) This means that at a distance of 20  m from the centerline, the blood is flowing at a rate of 11,111 m/s. We can also take the derivative of our velocity equation and yield what is known as the velocity gradient. This is how the velocity of the blood is changing as we move toward the outer wall of the blood vessel. So, what is the velocity gradient when you are 20 m from the centerline? 5 Syntax: subs(f,a,b) Output: An expression defined by f where all a 's are replaced by b's. Description: Replaces all occurrences of a in f with b, if f is an expression involving the symbolic variable a. We take the derivative as before: dv_dt = diff(v1,r); pretty(dv_dt) We therefore have the velocity gradient equation. Now we can substitute .002 for r and get the value of the velocity gradient. subs(dv_dt,r,.002) This means that the velocity of the blood is decreasing at a rate of 74 (cm/s)/s for every cm we proceed from the center. Let's convert this to  m and get a feeling for what this statement means. If we convert to  m, we get a decreasing rate of 74(m /s)/s. Recall that at the central axis the velocity of the blood is 11,111  m/s. The velocity gradient tells us that at a distance of 20  m from the central axis, the velocity of the blood is decreasing at a rate of about 74 m/s for every m that we proceed from the center. 6 Syntax: pretty(S) Output: symbolic output of matrix S in a format that resembles typeset mathematics. Description: The pretty function prints symbolic output (in this case the symbolic matrix S) in a format that resembles typeset mathematics
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved