Calculus I:  Mathematica Practice 2

Syntax Checks

Clear[f,g,h]

The following Mathematica commands have syntax errors. Fix the errors so the commands will work.

Problem 1

Table[{i,i^2-3},(i,-1,1,1/10)]
Listplot[%]

Problem 2

f[x]=SquareRoot(4x^2+1)/(x+1)
Limit[f[x],x->infinity]
Limit[f[x],x->-infinity]

Problem 2

f[x]=SquareRoot(4x^2+1)/(x+1)
Solve[f[x]=0,x]

Example Based on 2.6 Limits at Infinity

The velocity of a falling raindrop, under certain conditions, is given by

v(t)=(SuperStar[v])(1-exp(-((g t)/(SuperStar[v]))))

where t is the time, g is the acceleration due to gravity, and (SuperStar[v])is the terminal velocity of the raindrop.

(a) Find (lim_(t->∞)) v(t).

(b) Graph v(t) if (SuperStar[v])=1m/s and g=9.8m/(s^2). How long does it take for the velocity of the raindrop to reach 99% of its terminal velocity?

Barry's Solution

To find the limit, we need to use our limit laws and knowledge of exponential functions.

(lim_(t->∞)) v(t)=(lim_(t->∞))(SuperStar[v])(1-exp(-((g t)/(SuperStar[v]))))
=(SuperStar[v])(1-(lim_(t->∞))exp(-((g t)/(SuperStar[v]))))

Since g,t,(SuperStar[v]) are all positive, exp(-((g t)/(SuperStar[v]))) is a decreasing exponential function,and the limit as t approaches infinity is zero.

(lim_(t->∞)) v(t)=(SuperStar[v])(1-0)
= (SuperStar[v])

To answer the second part of the question, we define the function:

v[t_]=1 (1 -Exp[-9.8*t/1])

Now, we create a plot:

Plot[v[t],{t,0,1},PlotRange->{{0,1},{0,1}}]

We solve the following equation to determine at what time the function has reached 99% of it's terminal velocity, (SuperStar[v]):

Solve[v[t]==0.99 (1), t]

So, it takes less than half a second for the raindrop to be within 99% of its terminal velocity.

Example Based on 2.7 Derivatives and Rates of Change

(a) Find the slope of the tangent to the parabola y=1+x+(x^2) at the point where x=a.

(b) Find the slopes of the tangent lines at the points whose x-coordinates are -1,-1/2,and 1.

(c) Graph the curve and the three tangents on a common screen. Zoom in on one of the tangents where it touches the curve and verify the tangent line approximates the curve in that region.

Barry's Solution

First, there is some hand work to be done to determine the slope of the tangent line.

f(x) =1+x+(x^2)

m=(lim_(h->0))((f(a+h)-f(a))/h)
=(lim_(h->0))(1/h)[f(a+h)-f(a)]
=(lim_(h->0))(1/h)[1+(a+h)+(((a+h))^2)-1-a-(a^2)]
=(lim_(h->0))(1/h)[1+a+h+(a^2)+(h^2)+2a h-1-a-(a^2)]
=(lim_(h->0))(1/h)[h+(h^2)+2a h]
=(lim_(h->0))(h/h)[1+h+2a]
=(lim_(h->0))[1+h+2a], h≠0
=1+0+2a 
= 1+2a

Let's check the above calculation using Mathematica:

f[x_]=1+x+x^2

Simplify[(f[a+h]-f[a])/h]

Limit[%,h->0]

Good, we did the calculation correctly.

We can now calculate the slope of the tangent line at specific values of x=a

m[a_]=1+2a

Here is the slope m, at the point (Subscript[x, 0])=a, (Subscript[y, 0])=f(a)

a=-1
m[a]
f[a]

a=-1/2
m[a]
f[a]

a=1
m[a]
f[a]

m(Subscript[|, a=-1])=-1 ,(Subscript[x, 0])=-1, f(-1)=1=(Subscript[y, 0])
m(Subscript[|, a=-1/2])=0,(Subscript[x, 0])=-1/2,  f(-1/2)=3/4=(Subscript[y, 0])
m(Subscript[|, a=1])=3, (Subscript[x, 0])=1, f(1)=3=(Subscript[y, 0])

Equation of tangent lines:

y-(Subscript[y, 0])=m(x-(Subscript[x, 0]))
y-1=-1(x-(-1))
y=-x

y-(Subscript[y, 0])=m(x-(Subscript[x, 0]))
y-3/4=0(x-(-1/2))
y=3/4

y-(Subscript[y, 0])=m(x-(Subscript[x, 0]))
y-3=3(x-1)
y=3x

Here are the plots

Plot[{f[x],3x,3/4,-x},{x,-2,2},PlotStyle->{Black,Red,Blue,Green}]

Plot[{f[x],3x},{x,0.9,1.1},PlotStyle->{Black,Red}]

Example Based on 2.7 Derivatives and Rates of Change

The number (in thousands) of cellular phone subscribers in Malaysia is given by the following table (I've entered the data into Mathematica for you):

data={{1993,304},{1994,572},{1995,873},{1996,1513},{1997,2461}}

TableForm[data,TableHeadings->{None,{"Year","N"}}]

(a) Find the average rate of growth from 1995 to 1997, from 1995 to 1996, and from 1994 to 1995.

(b) Estimate the instantaneous rate of growth in 1995 by taking the average of two rates of change. What are its units?

(c) Create a plot of the data, with the points joined by straight line segments. Verify your answers in part (a) by calculating slopes from your sketch. This will be a very rough verification since you will be doing this by looking at the screen. The option GridLines -> Automatic might help you with calculating slope.

Barry's Solution

Average rate of growth from 1995 to 1997:

(2461-873)/(1997-1995)

The average rate of growth between 1995 and 1997 was 794 thousand subscribers per year.

Average rate of growth from 1995 to 1996:

(1513-873)/(1996-1995)

The average rate of growth between 1995 and 1996 was 640 thousand subscribers per year.

Average rate of growth from 1994 to 1995:

(873-572)/(1995-1994)

The average rate of growth between 1994 and 1995 was 301 thousand subscribers per year.

The average we should take is the average on each side, so it will be

(640+301)/2

N[%]

The estimate for the instantaneous rate of growth in the year 1995 is 470.5  thousand subscribers per year.

We need a sketch from which we can get the slopes (drag the sketch to make it bigger).

ListPlot[data,Joined->True,GridLines->Automatic]

(1500-1000)/(1996-1995.2)

(900-600)/(1995-1994)

Our calculations above appear to be correct.