• Aucun résultat trouvé

Tangent Lines

Dans le document Getting Started (Page 124-136)

Two Words of Caution

3.2 Differential Calculus

3.2.4 Tangent Lines

If f%aexists, we interpret f%ato be the slope of the line tangent to the graph of y fxat the pointa, fa. An equation of the tangent is given by

yfa f%axa or y f%axa fa.

EXAMPLE 3.2.6: Find an equation of the line tangent to the graph of fx sinx1/3cos1/3x

at the point withx-coordinatex5Π/3.

SOLUTION: Because we will be graphing a function involving odd roots of negative numbers, we begin by loading theRealOnlypackage contained in the Miscellaneousfolder (or directory). We then define

fxand compute f%x.

In[289]:= << Miscellaneous‘RealOnly‘

In[290]:= fx Sinxˆ1/3 Cosxˆ1/3 In[291]:= fx

Out[291]= Cosx1/3

3 x2/3 Sinx 3 Cosx2/3

Then, the slope of the line tangent to the graph offxat the point with

while they-coordinate of the point is In[293]:= f5Π/3

Thus, an equation of the line tangent to the graph of fxat the point withx-coordinatex/3is as shown in Figure 3-5.

In[295]:= p1 Plotfx,x, 0, 4Π, DisplayFunctionIdentity p2 ListPlot5Π/3, f5Π/3//N,

PlotStylePointSize0.03, DisplayFunctionIdentity

p3 Plotf5Π/3x5Π/3 f5Π/3,x, 0, 4Π, PlotStyle> GrayLevel0.6,

DisplayFunctionIdentity

In[296]:= Showp1, p2, p3, AspectRatio> Automatic, DisplayFunction$DisplayFunction

EXAMPLE 3.2.7: Find an equation of the line tangent to the graph of fx 94x2at the point1, f1.

2 4 6 8 10 12 1

2 3 4 5

Figure 3-5 fx sinx1/3cos1/3xtogether with its tangent at the point5Π/3, f/3

-3 -2 -1 1 2 3

-10 -7.5 -5 -2.5 2.5 5 7.5 10

Figure 3-6 fxtogether with its tangent at1, f1

SOLUTION: After definingf, we see that f1 5and f%1 8 In[297]:= fx 94xˆ2

f1 f1 Out[297]= 5 Out[297]= 8

so an equation of the line tangent toy fxat the point1,5isy5 8x1ory 8x13. We can visualize the tangent at1, f1with Plot. (See Figure 3-6.)

In[298]:= Plotfx, f1x1 f1,x,3, 3, PlotStyle>GrayLevel0, GrayLevel0.3, PlotRange>10, 10

Figure 3-7 An animation

In addition, we can view a sequence of lines tangent to the graph of a function for a sequence ofxvalues usingDo. In the following, we use Doto generate graphs ofy fxandy f%axafafor 50 equally spaced values ofabetween3and3. (See Figure 3-7.)

In[299]:= DoPlotfx, faxa fa,x,3, 3, PlotStyle>GrayLevel0, GrayLevel0.3, PlotRange>10, 10,a,2, 2, 4/49

On the other hand,

In[300]:= listofgraphics Table

Plotfx, faxa fa,x,3, 3, PlotStyle>GrayLevel0, GrayLevel0.3, PlotRange>10, 10,

DisplayFunction> Identity,a,2, 2, 4/8 toshow Partitionlistofgraphics, 3

ShowGraphicsArraytoshow

graphsy fxandy f%axa fafor nine equally spaced values ofabetween3and3and displays the result as a graphics array. (See Figure 3-8.)

In the graphs, notice that where the tangent lines have positive slope (f%x> 0), fxis increasing while where the tangent lines have nega-tive slope (f%x<0), fxis decreasing.

-3 -2 -1 1 2 3

Figure 3-8 fxtogether with various tangents

Tangent Lines of Implicit Functions

EXAMPLE 3.2.8: Find equations of the tangent line and normal line to the graph ofx2yy3 8 at the point3,1. Find and simplifyy%%

d2y/ dx2.

SOLUTION: We will evaluate y% dy/ dx if x 3 and y 1 to determine the slope of the tangent line at the point3,1. Note that we cannot (easily) solvex2yy38foryso we use implicit

In[302]:= s1 Dteq

Out[302]= 2 x y Dtx x2Dty 3 y2Dty 0 In[303]:= s2 s1/.Dtx 1

Out[303]= 2 x yx2Dty 3 y2Dty 0 In[304]:= s3 Solves2, Dty

Out[304]= Dty 2 x y x23 y2

Notice thats3is alist.The formula fory%dy/ dxis the second part of

Listsare discussed in more

detail in Chapter 4. the first part of the first part ofs3and extracted froms3with

In[305]:= s31, 1, 2 Out[305]= 2 x y

x23 y2

We then useReplaceAll(/.) to find that the slope of the tangent at 3,1is

In[306]:= s31, 1, 2/.x 3, y1 Out[306]= 1

The slope of the normal is1/1 1. Equations of the tangent and normal are given by

y11x3 and y1 1x3,

respectively. See Figure 3-9.

In[307]:= cp1 ContourPlotxˆ2yyˆ38,x,5, 5,y,5, 5, Contours 0, ContourShadingFalse,

PlotPoints200, DisplayFunctionIdentity p1 ListPlot3, 1,

PlotStylePointSize0.03, DisplayFunctionIdentity

p2 Plotx3 1,x3 1,x,5, 5, PlotStyleGrayLevel0.3,

DisplayFunctionIdentity

Showcp1, p1, p2, FrameFalse, AxesAutomatic, AxesOrigin 0, 0, AspectRatioAutomatic, DisplayFunction$DisplayFunction

To findy%%d2y/ dx2, we proceed as follows.

In[308]:= s4 Dts31, 1, 2//Simplify

-4 -2 2 4

-5 -2.5 2.5 5 7.5

Figure 3-9 Graphs ofx2yy38(in black) and the tangent and normal at3,1(in gray)

Out[308]= 2x23 y2 y Dtx x Dty x23 y22

In[309]:= s5 s4/.Dtx 1/.s31//Simplify Out[309]= 6 yx2y2 x23 y2

x23 y23 The result means that

y%%d2y

dx2 6x2yy3 x23y2 x23y23 .

Becausex2yy38, the second derivative is further simplified to y%% d2y

dx2 48x23y2 x23y23 .

Parametric Equations and Polar Coordinates For the parametric equationsx ft, ygt,t'I,

y%dy

dx dy/ dt dx/ dt g%t

f%t and

y%% d2y dx2 d

dx dy

dx d/ dtdy/ dx dx/ dt .

Ifx ft, ygthas a tangent line at the pointfa, ga, parametric equations of the tangent are given by

x fa t f%a and yga tg%a. (3.2)

If f%a,g%a 0, we can eliminate the parameter from (3.2) xfa

f%a yga g%a yga g%a

f%axfa

and obtain an equation of the tangent line in point-slope form.

In[310]:= l Solvexa t xa cx, t r Solveya t ya cy, t

Out[310]= BoxDatat cxxa xa Out[310]= BoxDatat cyya

ya

EXAMPLE 3.2.9 (The Cycloid): Thecycloidhas parametric equations xtsint and y1cost.

Graph the cycloid together with the line tangent to the graph of the cycloid at the pointxa, yafor various values ofabetween2Πand 4Π.

SOLUTION: After definingx and ywe use’ to computedy/ dt and dx/ dt. We then computedy/ dx dy/ dt/dx/ dtandd2y/ dx2.

In[311]:= xt tSint yt 1Cost dx xt

dy yt dydx dy/dx Out[311]= 1Cost Out[311]= Sint Out[311]= Sint

1Cost

In[312]:= dypdt SimplifyDdydx, t Out[312]= 1

1Cost

In[313]:= secondderiv Simplifydypdt/dx Out[313]= 1

1Cost2

We then useParametricPlotto graph the cycloid for2Π t 4Π, naming the resulting graphp1.

In[314]:= p1 ParametricPlotxt, yt,t,2Π, 4Π,

PlotStyle>GrayLevel0, Thickness0.01, DisplayFunction> Identity

Next, we useTableto definetoplotto be 40 tangent lines (3.2) using equally spaced values ofa between2Πand 4Π. We then graph each line toplotand name the resulting graph p2. Finally, we show p1 andp2together with theShowfunction. The resulting plot is shown to scale because the lengths of thexandy-axes are equal and we include the option AspectRatio->1. In the graphs, notice that on intervals for whichdy/ dxis defined,dy/ dxis a decreasing function and, conse-quently,d2y/ dx2 <0. (See Figure 3-10.)

In[315]:= toplot Table

xa t xa, ya t ya,a,2Π, 4Π, 6Π/39 p2 ParametricPlotEvaluatetoplot,

t,2, 2, PlotStyle> GrayLevel0.5, DisplayFunction> Identity

Showp1, p2, AspectRatio> 1, PlotRange>3Π, 3Π, DisplayFunction> $DisplayFunction

EXAMPLE 3.2.10 (Orthogonal Curves): Two linesL1andL2with slopes m1 and m2, respectively, are orthogonal if their slopes are negative reciprocals:m1 1/ m2.

Extended to curves, we say that the curvesC1andC2areorthogonal at a point of intersection if their respective tangent lines to the curves at that point are orthogonal.

Show that the family of curves with equationx22xyy2 C is orthogonal to the family of curves with equationy22xyx2C.

SOLUTION: We begin by definingeq1and eq2to be the left-hand sides of the equationsx22xyy2Candy22xyx2 C, respectively.

In[316]:= eq1 xˆ22x yyˆ2 eq2 yˆ22x yxˆ2

-5 5 10

-7.5 -5 -2.5 2.5 5 7.5

Figure 3-10 The cycloid with various tangents

We then useDtto differentiate andSolveto findy% dy/ dx. Because the derivatives are negative reciprocals, we conclude that the curves are orthogonal. We confirm this graphically by graphing several members of each family withContourPlotand showing the results together.

(See Figure 3-11.)

In[317]:= BoxDatas1 Dteq1/.Dtx> 1, Dty> dydx, Solves1 0, dydx

Out[317]= 2 x2 dydx x2 y2 dydx y Out[317]= dydx xy

xy

In[318]:= BoxDatas2 Dteq2/.Dtx> 1, Dty> dydx, Solves2 0, dydx

Out[318]= 2 x2 dydx x2 y2 dydx y Out[318]= dydx xy

xy

-4 -2 2 4

-4 -2 2 4

Figure 3-11 x22xyy2Candy22xyx2Cfor various values ofC

In[319]:= cp1 ContourPloteq1,x,5, 5,y,5, 5, ContourShading> False,

ContourStyle> GrayLevel0, Frame> False, Axes> Automatic, AxesOrigin>0, 0,

DisplayFunction> Identity, PlotPoints> 60 cp2 ContourPloteq2,x,5, 5,y,5, 5,

ContourShading> False,

ContourStyle> GrayLevel0.4, Frame> False, Axes> Automatic, AxesOrigin>0, 0,

DisplayFunction> Identity, PlotPoints> 60 Showcp1, cp2, DisplayFunction> $DisplayFunction

EXAMPLE 3.2.11 (Theorem 1. The Mean-Value Theorem for Deriva-tives): Ify fxis continuous ona, band differentiable ona, bthen there is at least one value ofcbetweenaandbfor which

f%c fb fa

ba or, equivalently, fb fa f%cba. (3.3) Find all number(s)cthat satisfy the conclusion of the Mean-Value Theorem for fx x23xon the interval0,7/2.

SOLUTION: By the power rule, f%x 2x3. The slope of the secant containing0, f0and7/2, f7/2is

f7/2 f0 7/20 1

2. Solving2x31/2forxgives usx7/4.

In[320]:= fx xˆ23x Out[320]= 3 xx2

In[321]:= Solvefx 0, x Out[321]= x 3

2

In[322]:= Solvefx f7/2 f0/7/20 Out[322]= x 7

4

x 7/4satisfies the conclusion of the Mean-Value Theorem for fx x23xon the interval0,7/2, as shown in Figure 3-12.

In[323]:= p1 Plotfx,x,2, 4,

DisplayFunctionIdentity p2 Plotfx,x, 0, 7/2,

PlotStyleThickness0.02, DisplayFunctionIdentity p3 ListPlot0, f0,7/4, f7/4,

7/2, f7/2,

PlotStylePointSize0.05, DisplayFunctionIdentity p4 Plotf7/4x7/4 f7/4,

f7/2 f0/7/20x,

x,2, 4, PlotStyle Dashing0.01, Dashing0.02,

DisplayFunctionIdentity Showp1, p2, p3, p4, DisplayFunction

$DisplayFunction, AspectRatioAutomatic

-2 -1 1 2 3 4

-4 -2 2 4

Figure 3-12 Graphs of fx x23x, the secant containing0, f0and7/2, f7/2, and the tangent at7/4, f7/4

3.2.5 The First Derivative Test and Second Derivative

Dans le document Getting Started (Page 124-136)