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

Differential Models and Anti-derivatives in Mathematica - Prof. Christopher W. Seaton, Study notes of Calculus

A series of problems and solutions related to differential models, anti-derivatives, and areas under curves. It includes examples of mathematica commands and functions to solve these problems, as well as estimations from data and improved approximations. Topics such as finding the total mass flowing into a settlement tank, solving differential equations, and calculating areas under curves.

Typology: Study notes

Pre 2010

Uploaded on 08/13/2009

koofers-user-n1l
koofers-user-n1l 🇺🇸

10 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Module 4:
Areas under curves and Anti -derivatives
Problem 1: Velocity from Acceleration.
Problem 2: Mass from Concentration, in the
outlet pipe
Problem 3: Mass from Concentration, in the
settlement tank
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Differential Models and Anti-derivatives in Mathematica - Prof. Christopher W. Seaton and more Study notes Calculus in PDF only on Docsity!

Module 4:

Areas under curves and Anti -derivatives

Problem 1: Velocity from Acceleration.

Problem 2: Mass from Concentration, in the

outlet pipe

Problem 3: Mass from Concentration, in the

settlement tank

In this module we will see how to calculate total accumulations of quantities from the rate of accumulation. This includes calculating total amounts from densities and concentrations. This type of calculation can also be used to find the area with a curved boundary. The formal mathematical techniques we develope here will be studied in Module 5.

1 Problem 1

1.1 Statement

The most critical stage of a 100m race is as the athlete accelerates out of the blocks. The athlete will be able to maintain the speed they manage to reach in this phase. Below are the values of an athlete’s acceleration in the first 0. seconds of a practice run. What is the athlete’s speed 0.8 seconds into the run?

Time (sec) Acceleration (m/s^2 ) 0 20. 0.1 20. 0.2 19. 0.3 17. 0.4 14. 0.5 9. 0.6 5. 0.7 1. 0.8 0

1.2 Estimation from the Data

If we assume that the athlete maintains each of these accelerations for the full interval, then we could calculate their speed as follows:

Acceleration Length of interval Increase in speed 20.4 0.1 20. 4 × 0 .1 = 2. 04 20.3 0.1 20. 3 × 0 .1 = 2. 03 19.4 0.1 19. 4 × 0 .1 = 1. 94 17.3 0.1 17. 3 × 0 .1 = 1. 73 14.0 0.1 14. 0 × 0 .1 = 1. 40 9.8 0.1 9. 8 × 0 .1 = 0. 98 5.3 0.1 5. 3 × 0 .1 = 0. 53 1.6 0.1 1. 6 × 0 .1 = 0. 16 ∑^8

i=

ai × 0 .1 = 10. 81

Each of these multiplications can be represented as an area of a rectangle and together can be draw as:

0.2 0.4 0.6 0.

5

10

15

20

Total area is 10.81.

1.3 Improved approximations using a fitted model

The athlete does not, however, maintain their acceleration over the whole 0. second interval, their acceleration is continually decreasing. If we had their acceleration every 0.05 seconds and repeated the calculation above we would obtain a more accurate approximation. To find the athlete’s acceleration at these intermediate times we first fit an interpolation function to the data. If we find the best fitting model of the form y = at^4 + bt^3 + c using the techniques of Module 3 we would find that this data is approximated by with the function

a(t) = 150. 51 t^4 − 160. 28 t^3 + 20. 42

So the speed would be

∑^15

i=

a(0. 05 × i) × 0 .05 = 10.299. This can be calculated

in Mathematica with the commands:

acc[t_]=150.51 t^4-160.28t^3+20. Sum[acc[0.05i]0.05,{i,0,0.8/0.05-1}]

As before, we can represent this a the sum of the areas of rectangles (each rectangle has a height of a(0. 05 × i) and a width 0.05. These are pictured below:

answer we get is 9.78853. So the athletes speed, to 3 significant figures, at the end of this spurt of acceleration is 9.79 m/s.

1.5 Another method

Acceleration is, by definition, the instantaneous rate of change of velocity (speed). So if a(t) represents the acceleration of a body at time t and v(t) represents the speed of that body at time t then

dv dt

= a(t)

In this problem the ‘body’ is the athlete, we know their acceleration (a(t) =

  1. 54 t^4 − 159. 51 t^3 + 20.42) and wish to know the athlete’s speed at t = 0.8. In other words if we differentiated the function we want to know about (speed) we would get 149. 54 t^4 − 159. 51 t^3 + 20.42 (acceleration), so we have to ‘undo’ the differentiation that led to 149. 54 t^4 − 159. 51 t^3 + 20.42. Another way to say this, is that to find the speed we need to solve the differential equation

dv dt

= 150. 51 t^4 − 160. 28 t^3 + 20. 42

This equation is also called the model of the problem. Mathematica will solve this differential equation in response to the command

DSolve[v’[t]==150.51 t^4-160.28t^3+20.42,v[t],t]

The solution it gives is 20. 42 t − 40. 07 t^4 + 30. 1 t^5 + C 1 , where C 1 denotes the arbitrary constant. We do not have to worry about the value of this constant if we think of our problem as finding the increase in speed from t = 0 to t = 0. 8 then we are finding v(0.8) − v(0) and this is

(20. 42 × 0. 8 − 40. 07 × 0. 84 + 30. 1 × 0. 85 + C 1 ) − (0 + C 1 )

and the value of this is 9.79, to 3 significant figures.

2 Anti-derivatives and Areas

2.1 Summary of anti-derivatives

The table below summarizes the anti-derivatives that should be memorized:

f (x)

f (x)dx

xn, for n 6 = − 1

n + 1

xn+1^ + C 1 x

ln(x) + C

eax^

a

eax^ + C

cos(ax)

a sin(ax) + C

sin(ax) −

a

cos(ax) + C

For any other f (x) use the Mathematica command DSolve[F’[x]==f[x],F[x],x]

2.2 Calculating areas under curves

2.2.1 Theoretical summary

We have seen that we can find the area under a curve inbetween two values of x we can sum the areas of rectangles under the curve, and take the limit as the width of the rectangles tends to zero. In other words calculate:

lim dx→ 0

⌊(b− ∑a)/dx⌋

i=

f (a + idx) dx

In Mathematica the command for this is

Limit[ Sum[ f[a+i*dx], {i,0,(b-a)/dx-1} ], dx->0]

2.2.2 Example

For the function f (x) = − 2 x^3 + 8x, calculate the following areas:

a. The sum of the areas of rectangles under the curve of width 0.2 from x = 0.6 to x = 1.6. Provide a graphical illustration.

b. The sum of the areas of rectangles under the curve of width 0.05 from x = 0.6 to x = 1.6. Provide a graphical illustration.

c. The sum of the areas of rectangles under the curve of width 0.01 from x = 0.6 to x = 1.6. Provide a graphical illustration.

d. The area under the curve from x = 0.6 to x = 1.6.

3 Problem 2

3.1 Statement

A factory needs to use a certain toxic chemical in its processing. There is a steady flow, of 500 litres of water per hour, through the machinary that washes the chemical into a settlement tank. The factory runs its process for eleven hours and then stops for one hour to allow the equipment to be washed clear of the chemical. The table below shows the concentration of chemical in the outlet pipe, at different times during a typical twelve hour shift. Our task is to calculate the total mass of chemical in the tank when it is full. The settlement tanks measure 18m by 5m and are 2m deep.

Time (Hours) Concentration (mg/L) 0 0. 2 0. 4 0. 6 3. 8 100 9 481 10 1618 10.5 2368 11 2415 11.5 1946 12 0.

3.2 Estimation from the Data

If we assume that the concentration is constant over the time intervals

Concentration Length of interval Amount of chemical 0.00 4.0 0. 00 × 4. 0 × 500 = 0. 00 0.28 2.0 0. 28 × 2. 0 × 500 = 0. 56 3.33 2.0 3. 33 × 2. 0 × 500 = 6. 66 100 1.0 100 × 1. 0 × 500 = 100 481 1.0 481 × 1. 0 × 500 = 481 1618 0.5 1618 × 0. 5 × 500 = 809 2368 0.5 2368 × 0. 5 × 500 = 1184 2415 0.5 2415 × 0. 5 × 500 = 1207. 5 1946 0.5 1946 × 0. 5 × 500 = 973 ∑^9

i=

ai × dti × 500 = 2 380 860

Each of these multiplications can be represented as an area of a rectangle times 500, and together can be draw as:

2 4 6 8 10 12

500

1000

1500

2000

Total area is 4761.72. So the total amount of chemical flowing into the tank in one shift is 4761. 72 × 500, i.e., 2 380 860.

3.3 Improved approximations using a fitted model

The concentration does not, however, remain constant for the whole time inter- val, it changes continuously within the intervals. If we had a measurement of the concentration every 30 minutes we could assume that it remained constant over these intervals, and obtain a more accurate estimate. The closest we can get to 30 minute measurements is to fit an interpolation function to the data. In Module 3 we saw a very similar problem and using that process we see that the concentration,c, at time t may be written as:

c(t) = 18302(12 − t)^2 e^1 .9291(12−t)

So the ‘30 minute’ estimate would be 500

∑^23

i=

c(0. 5 i) 0.5 = 2 540 896. To calculate

this in Mathematica we can type:

con[t_]=18302(12-t)^2E^(1.9291(12-t)); 500Sum[con[0.5i]*0.5,{i,0,23}]

The graphical representaion of this sum is

3.5 Differential Model

If the amount of a chemical is evenly distributed through out a volume of water then the concentration is given by the word formula

Concentration =

Amount Volume

In this problem, however, the amount in the water changes continuously. So if we focus on a very short time interval, from t to t + dt say, and think about the water that leaves the outlet pipe in this time interval, we can say:

Average Concentration of water that passes between time t and time t + dt

Amount of Chemical to pass in dt hours Volume of water to pass in dt hours

A(t + dt) − A(t) 500 dt

where we are using A(t) to represent the total mass of chemical to have passed through the pipe in t hours. The instantaneous concentration at time t will, therefore be given by:

c(t) = lim dt→ 0

A(t + dt) − A(t) 500 dt

dA dt

This allows to say that the differential model of the problem is:

dA dt

= 500c(t) = 500

18302(12 − t)^2 e^1 .9291(12−t)

To solve this equation in Mathematica we type:

DSolve[A’[t]==500(bestA(12-t)^2E^(bestB(12-t))),A[t],t]

The solution that Mathematica gives is

t 1. C[1] + E 2 *(t -0.010500525421595833 + t 0.00041940429675416064 + 0.06583748987344133)

If we rephase the main question to be find the increase in the amount to flow into the tank in a 12 hour shift, then we are asking for A(12) − A(0) and so will not have to worry about the value of the arbitary constant C[1]. In Mathematica we type A[12]-A[0] and we get 2. 54944 × 106.

3.6 Final calculation

The solution of 2. 54944 × 106 mg is the mass of chemical to flow into the tank in one shift. To calculate the total amount to flow into a full tank we must find out how many shifts it takes to fill a tank. Volume of a tank is 18 × 5 × 2 = 180m^3. The total amount of water in a full tank is, therefore 180 000L (a volume of 1m^3 holds 1 000L of water). The flow rate is 500L per hour so it takes 180 000 500 = 360 hours to fill the tank. There are 12 hours in a shift, so it takes 30 shifts to fill a tank. Hence the total mass of chemical to flow into the tank is 30 × 2. 54944 × 106 = 7. 64833 × 107 mg or 76.4833kg.

3.7 Exercise for Homework 3

  1. Another factory runs on on 4 hour shifts and the concentration function is c(t) = 3. 2 t(4 − t)e−^2 .5(4−t)t. The flow rate is 100 L/hour.

(a) What is the total amount of chemical to flow into the tank in the first 2 hours of the shift? (b) What is the total amount of chemical to flow into the tank in a shift? (c) A full tank holds 1600L. What is the mass of the chemical in a full tank?

  1. At another factory the concentration function, for a 6 hour shift, is know to be c(t) = 3(6 − t)e−^0 .01(6−t). The flow rate is 200 L/hour.

(a) State the differential model for A(t), the total amount of chemical to flow out in the first t hours of the shift. (b) Find the increase in the amount of chemical to flow into the tank between the second and fifth hour of the shift.

Copy your solutions into a word document and submit within Moodle.

0.5 1 1.5 2

500

1000

1500

2000

2500

3000

Total area is 589.875. So the total amount is 589. 875 × 18 × 5 × 1 000, i.e., 53 088 800.

4.3 Improved approximations using a fitted model

The concentration does not, however, remain constant for the whole 25cm, it changes continuously within the depths. If we had a measurement of the concentration every 10cm we could assume that it remained constant over these intervals, and obtain a more accurate estimate. The closest we can get to 10cm measurements is to fit an interpolation function to the data. Tutorialal groups from previous semesters have fitted a model of the form

c(h) =

a √ b −

h

to this data and found that the optimal model was:

c(h) =

h

So the ‘10cm’ estimate would be 90 000

∑^19

i=

c(0. 1 i) 0.1 = 64 328 200. To calculate

this in Mathematica we can type:

con[h_]=105.5138/(1.44801-Sqrt[h]); 90000Sum[con[0.1i]*0.1,{i,0,19}]

The graphical representaion of this sum is

0.5 1 1.5 2

500

1000

1500

2000

2500

3000

It would be more accurate still to assume that the concentration was constant for only 1cm, and calculate 90 000

i=0 0.^01 c(0.^01 i).^ The Mathematica com- mand that does this is 90000Sum[con[0.01i]*0.01,{i,0,2/0.01-1}] and the result is 75 127 900. The illustration of this is

0.5 1 1.5 2

500

1000

1500

2000

2500

3000

4.4 Best possible approximation

Taking this process to its limit, the best approximation we could make by this process is

lim dt→ 0

2 /dh ∑− 1

i=

c(i dh) dh

The Mathematica command that would calculate this is

Limit[90000Sum[con[idh]*dh,{i,0,2/dh-1}],dh->0]

Unfortunately Mathematica can have problems calculating limits for transenden- tal functions, so the best we can do is to set dh to a very small value. A further

The solution that Mathematica gives is

C[1] + 9.496244760263806e *(Sqrt[h] -2. + -2.8960278685557594 Log[-1.55876932e8 + Sqrt[h] 1.07648779e8])

If we rephase the main question to be find the increase in the amount from the top of the tank to the bottom, then we are asking for A(2) − A(0), and we will not have to worry about the value of the arbitary constant C[1]. In Mathematica we type A[2]-A[0] and we get 7. 64764 × 107.

4.6 Final calculation

This amount is similar, but not equal to, the amount that we estimated as flowing into the tank. The difference in the amounts is 7. 64833 × 107 − 7. 64764 × 107 = 6921.97mg. This is the mass of chemical that we estimate has been lost from the tank during the time that the water has been settling. This may, or may not, be a large amount, it depends on the nature of the chemical.

4.7 Exercise for Homework 4

  1. At a different time the concentration function, for concentrations at diffe- tent depths in a settlement tank is c(h) =

√ (^32). 05 − √ (^3) h.

(a) Estimate the mass of chemical in the tank by assuming that the concentration is constant for ‘sheets’ of depth 0.25cm. (b) Find the best estimate that Mathematica will allow, for the mass of chemical in the tank.

  1. Another tank measures 10m by 4m and is 1.5m deep. The concentration function is found to be c(h) =

h (a) State a differential model for A(h), the mass of chemical in the top h metres of the tank. (b) Find the increase in the mass of chemical from the top to the bottom of the tank.

Copy your solutions into a word document and submit within Moodle.