Popular in Course
verified elite notetaker
Popular in Mathematics (M)
This 33 page Class Notes was uploaded by Claudine Friesen on Monday September 28, 2015. The Class Notes belongs to MATH103 at University of Pennsylvania taught by Staff in Fall. Since its upload, it has received 31 views. For similar materials see /class/215396/math103-university-of-pennsylvania in Mathematics (M) at University of Pennsylvania.
Reviews for INTRODUCTIONTOCALCULUS
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/28/15
diff and Diff The diff command is used to compute derivatives of Maple expressions The syntax of diff is Maple s usual diffwhathow syntax quotWhatquot in this case refers to quottake the derivative of whatquot and quothowquot to quotwith respect to what variablequot For example to compute d 3x6 dx x24 we would enter gt restart gt diff3x 6xquot2 4x 2 3 x 6 x 2 2 x 394 x24 Notice the first argument of diff is the expression whose derivative is being taken and the second tells with respect to what variable the derivative is being taken This second part becomes crucial in expressions such as gt diffexpax x aeax gt where there are constants parameters or other variables around Maple assumes that you mean to take the derivative as the variable you specify changes and that all other letters in the expression represent constants but see the sections below on implicit differentiation and partial derivatives Maple can deal quottheoreticallyquot with derivatives of functions that do not yet have explicit definitions For example you may not have yet defined fx or gx but Maple can tell you that 86 gt difffXgxrx7 x goc fx gx Maple 95 uses the standard ddx notation for derivatives of one variable functions Earlier versions of Maple through Maple 9 uses the quotrounded dquot partial derivative sign for all derivatives This is a convention that was chosen by the people who produced the software Higher derivatives There is a special notation for second third etc derivatives Instead of typing gt diffdiff3sinx x x 3 sinx for the second derivative of 3sinx you may use either of the following the second is easiest to type gt diff3sin x xx 3 sinx gt diff3sinxx27 3 sinx There are obvious extensions to this using x3 x4 etc Examples Here are a few examples of standard uses of derivatives which combine diff with other basic Maple commands 1 Find the slope ofthe tangent line to the graph of y3xx2 at the point x3 y9 Solution First define the variable y to be equal to the expression gt y3xx 2 Then take the derivative we choose the name dy for the derivative gt dydiff yx 3 3 x d y x2 x 2f 87 Then substitute X3 into the expression for the derivative of y gt subsx3 dy 6 The slope at that point is 6 We can use this information to plot the graph of y together with its tangent line at X3y9 as follows gt tangentline9 6 x 3 tangentline 27 6 x gt plot y tangentline x2 5 4 color green red thickness2 I 14 12 10 lllllllllllllllllllllllllllllllllllllll 26 28 3 32 3 36 38 2 Find the maximum and minimum of the function xexp x on the closed interval xO 3 Solution Since we are using Maple we plot first and calculate later gt yxexp x 39x yxe gt plot y x0 3 colorb1ue thickness2 88 035 03 025 02 015 01 005 O llllIlIllllllllllllllllllllllll 0 05 1 15 2 25 3 It looks like the minimum of y is zero at x0 and the maximum occurs for xl which would make it le To verify this we do the calculations First we need to nd the critical points of y ie take the derivative and set it equal to zero gt dydiffyx dy e x x e x gt solve dy0 x 1 This veri es our earlier observation that there is one critical point in the interval at xl Now we need to evaluate y at the critical point and at the endpoints of the interval gt subsx0 y subs x1 y subs x3 y 1 3 0 e y 3 e We know which is the biggest and which is smallest from the plot but it doesn39t hurt to verify this numerically gt evalf 0 03678794412 01493612051 To summarize the maximum value of y is le which occurs when xl and the minimum is 0 which occurs when x0 Implicit differentiation Maple knows how to take the derivative of both sides of an equation As illustrated above with the product rule Maple can also quottheoreticallyquot take derivatives of functions whose de nitions are not speci ed What must be speci ed explicitly is the dependence of the function on its variable This means that if you are thinking of y as being a function of x you must write quotyxquot in your equations rather than just quotyquot Here is a typical implicit differentiation problem 89 2 3 3 The variables X and y are related by the equation x yX 3 yX x 0 Find the slope of the graph of this equation at the point where X3 and yl Solution First de ne the equation where we are considering y as a function of X ie X is the independent variable and y is the dependent one gt restart gt eqxquot2yx 3yxquot3x 0 eqx2yx3yx3x0 It is crucial to write yX everywhere Now we can take the derivative of both sides gt deqdiffeqx deq2xyxx2 yx 9yx2x yx 3yx30 x x This gives the relationship among X y and the derivative of y with respect to X To solve the problem we need to solve this equation for the derivative of y and then substitute X3 and yl into the solution gt solve deqdiff yx x 2 x yx 3 yx3 x2 9 yx2 x gt subsyx1x3 l 6 Note The order in which we did things ie solve then substitute is important because substitution into the differentiated equation deq will replace pieces of the eXpression diff y x x with numbers which would be premature Try it to see what goes wrong You might also see what goes wrong if you replace the substitution statement above with quot subs x3 yxl quot This is avery good eXample which shows that substitutions are done from left to right There is another way to do implicit differentiation by using the command quotimplicitdiffquot Its syntaX is gt implicitdiff fyx 90 where f is the expression that you want to differentiate y the dependent variable and x the independent variable For example gt implicitdiffxquot2y 3yquot3x0yx 3 2 xy 3y x2 9y2 x gt subsy1x3 ON F or more help on implicitdiff type gt imp1icitdiff Remarks Occasionally to make your worksheets easier to read you may wish to have Maple display a derivative in standard mathematical notation without evaluating it For this there is a capitalized quotinertquot form of the diff command d ex dx lx Sometimes you can use the two forms together to produce meaningful sentences gt Diffexpx 1 x x gt Diffexpx1 x xdiffexpx1 x x x x x i e e e 6196 lx lx 1x2 Partial derivatives Toward the end of Math 104 you will learn how to take quotpartial derivativesquot of functions of several variables Maple can take partial derivatives as well as ordinary ones the same diff command is used for this It is here that the quothowquot part of the diff command is especially important For example here is a function of two variables 91 gt fxquot3expy sinxy fx3 ey sinxy To take the partial derivative of f with respect to X we use the command notice the use of the capitalized form of the diff command gt Difffxdifffx 3 x3 ey sinxy 3 x2 ey cosxyy x For the partial derivative with respect to y we would use gt Difffydiff fy log ey sinxy x3 ey cosxyx y To take higherorder partial derivatives we simply list the sequence of variables with respect to which to take the derivative gt Difffxxydifffxxy a x3eysinxy 6xeycosxyxy22sinxyy 3y3x2 Few things can go wrong using thedif f command other than syntax errors except possibly that sometimes the variable in the command the x in quotdiff xquot has already been given a value that you forgot about gt x3 gt diffxquot2sin2xquot2 x Error invalid input diff received 3 which is not valid for its 2nd argument Here diff is objecting to your trying to take the derivative quotwith respect to 3quot Another common error is to forget the quothowquot X part entirely For instance 92 gt diff3tquot5 Error invalid input diff expects 2 or more arguments but received 1 instead of gt diff3tquot5t 154 93 Illustrating sums that approximate integrals leftbox Ieftsum value rightbox rightsum In Maple39s quot studentquot library there are several commands that can be used to illustrate the computation of integrals via Riemann sums To use these commands you must first enter the command gt restart gt with student The colon at the end of the line surpresses the output if you use a semicolon you will get a list of all of the commands available in the student library We demonstrate the use of the commands by working through the following example Use Riemann sums to compute gt Int1tt1 2 Recall that the quot Intquot command with a capital I is used to get Maple just to type integrals It does not evaluate them the quot intquot command with a small i does that But the form of the two int for integral commands is the usual verbwhathow form of many Maple commands Before the comma you enter the name of the expression to be integrated quotIntegrate whatquot and after the comma you give the name of the variable and the range of integration quotIntegrate it howquot We will illustrate only the lefthand sums Maple has three relevant commands quot leftbox quot which draws pictures quot leftsumquot which gives summation notation for the area under the left boxes and quotvaluequot which computes the sums evalf can also be used So as we approximate the above integral using 10 rectangles which touch the curve on the left we can have Maple illustrate the boxes by typing 98 gt 1eftbox1tt1 210 0 O O O I A a on x O I IIIIIIIIIIIIIIIIIIIIII 14 16 18 2 12 The syntax of leftbox matches that of int except it has athird argument which specifies the number of boxes to be used to approximate the integral Notice that in this case the sum of the areas of the boxes gives an overestimate of the area under the curve because the curve is concave up To calculate the sum of the areas of the boxes use the command gt 1eftsum1tt1 210 9 l l E 1 1 01z 10 gt In this expression Maple has numbered the ten boxes from 0 to 9 and the area of the ith boxis equal to 110 l lilO Notice that 110 is At and the other factor is the value of the function lt at the left side of the box To calculate the sum we can ask Maple for 99 gt value 33464927 46558512 gt gt eva1f 07187714032 Maple is capable of calculating but not drawing the area for an arbitrary unspeci ed number of boxes gt 1eftsum1tt1 2n 711 2 1 1501 71 gt value 71 I 2 n 71 T01 71 The quot Psiquot function is a special function used by number theorists The point of getting Maple to do this is we can now ask Maple what happens as the number ofboxes approaches infmity gt limit ninfinity ln2 And this is in fact the value of the integral as we can check using Maple39s int command which uses the Fundamental Theorem of Calculus to evaluate integrals gt int1tt1 2 ln2 There are commands quot rightboxquot and quotrightsumquot and quotmiddleboxquot and quot middlesum that correspond to quot leftboxquot and quotleftsumquot Also there are quot trape zoidquot and quotSimpsonH for using those numerical integration rules 100 fsolve Use fsolve to have Maple use numerical approximation techniques as opposed to algebraic methods to find a decimal approximation to a solution of an equation or system of equations The syntax of fsolve is the standard Maple syntax fsolve what how where quotwha quot stands for the equation or system of equations to be solved and quothowquot refers to the variables being solved for To read more about setting up equations for solution see the description of the solve command Using fsolve to solve a single equation Because fsolve uses numerical techniques rather than algebraic ones it is required that the number of equations be precisely the same as the number of variables being solved for So when fsolving one equation it is crucial that there be exactly one unspeci ed variable in the equation There are two ways to use the f solve command The first is precisely like the solve command gt restart gt fsolvexquot25x17 x 7321825380 2321825380 This demonstrates that fsolve like solve knows how many roots to expect of a polynomial and will attempt to nd them all even if some are complex When solving a transcendental equation f solve is usually content to find one solution The second way to use f solve is especially important when an equation has many solutions and you want to pick out a speci c one In this version of f solve it is possible to specify a domain interval in which the solution should be found For example consider the equation gt eqn xtan x eqn x tanx 61 As we can see from plotting both sides this equation has many solutions gt plot x tan x x 8 8 8 8 disconttrue thickness2 color b1ack I I Just using fsolve on this equation will nd one solution gt fsolveeqnx 0 Now suppose we want to nd the solution between 6 and 8 Then we enter gt fsolveeqnxx6 8 7725251837 gt tan 7725251841 So we have found the solution to about 7 decimal places What can go wrong Aside from syntax errors there are a few things that can go wrong when using fsolve First as with solve it is possible that the quotvariablequot in the equation to be solved has already been given a value perhaps one that was forgotten in the course of the Maple session This results in the following response gt x 3 fsolve xquot24 x Error in fsolve invalid arguments 62 The other things that can go wrong involve Maple s seeming inability to nd a solution This can result from one of two situations rst there might be no solution second the numerical procedure being used by Maple might need a little assistance from the user For example gt x39x39 fsolvesinxexpxquot2 x 2 fsolve sinx ex x This quotnonresponsequot from Maple indicates that it cannot nd a solution But that is because this equation has no solutions Sometimes fsolve chooses its initial approximation poorly and subsequently is unable to nd a solution even if it exists In this case Maple returns a message to this effect and suggests choosing a quotdifferentquot starting interval In this case using the second version of fsolve with speci ed domain will remedy the problem Of course to nd the appropriate domain the most reasonable thing to do is plot the two sides of the equation and look for the intersection point Finally fsolve will return an error message if there is a different number of equations than unknowns gt fsolve ax1 x Error in fsolve a is in the equation and is not solved for Of course the solve command is able to handle this equation easily gt solve ax1x Q Using fsolve to solve systems of equations To be consistent with its quotwhatquotquothowquot syntax fsolve requires that a system of equations be enclosed in braces and that the list of variables being solved for also be so enclosed For example gt fsolve2xy17 xquot2 yquot220 xy x 1637758198 y 1575516397 It is important to remember that the number of equations must be the same as the number of unknowns and that no other unspeci ed variables are allowed in the equations gt fsolve axy13 bx y20 xy Error in fsolve a b are in the equation and are not solved fcr Finally we note that it is possible and often advisable to give fsolve a domain to search in this is done by giving an interval for each variable separately thereby providing fsolve 63 with arectangular boxlike region in which to nd a solution For example let s consider the system solved above gt eqn12xy17 eqn2xquot2 yquot220 We give the equations names mostly to remind you that this is possible Experimenting with several plots ultimately resulted in the following one which shows that our quotf solvequot statement above returned only one of the two intersection points gt plot 17 2x sqrt xA2 20 sqrtxquot2 20 x4 20colorb1ack thickness2 10 20 We can force fsolve to nd the leftmost one as follows gt fsolveeqn1eqn2 xy x4 8y0 10 y 4421830634 x 6289084683 The syntax here is important First comes the set of equations to solve enclosed in braces then the set of variables to solve for enclosed in braces and then the list of ranges for the variables enclosed in braces Only the third of these the list of variable ranges is optional when solving systems of equations The other two must be present As usual with solve and fsolve we can substitute this solution just as it is back into the equations to make sure it is correct First we give it a name gt s s y 4421830634 x 6289084683 64 gt subsseqn1 subsseqn2 1700000000 17 1999999999 20 So it seems to work A quick note about the last output 1999999999 is obviously not 20 but it is as close as Maple can come under the circumstances All computers and calculators do arithmetic to a limited number of digits and as a result values which require more digits than available are rounded off or chopped off depending on the way the computercalculator is designed Calculations made with imprecise numbers lead to imprecise results and for longer problems involving many calculations can cause the computercalculator to produce results not even close to the correct answer One nal note when you give intervals for the variables it is necessary to give ranges for all of the variables fsolve will return nothing if intervals are speci ed for some but not all variables 65 Math 103 Rimmer 96x9 Hiya 3132 The Derivative Section 31 The limit of the slopes of the secant lines is the slope of the tangent line Math 103 Rimmer EM 3132 The Derivative Another expression for the slope of the tangent line Qa h fa h m 1irn h gt0 fah fa h 9232009 5152TheDlerivative If you zoom in on the point of tangency the function is quotlocally linearquot there Module 31 httpwwwstewartcacuuscomtec Math IDSR39 List the followrng numbers from smallest to largest 5152men39e39239539ihe 0 939 2 9 0 9 2 9 4 y WI O N w gt a Thamwn mng Eduunnn 9232009 9232009 a Math 103 Rimmer ma a 3132 The Derivative fx2fxl Thisiscalleda Ax x2 x1 difference quotient This is the average rate of change of y f x with respect to x over the interval x1x2 average rate of change mPQ instantaneous rate of change slope of tangent at P A x x hmyzhmf 2 l Aan Ax x2 Axl x2 XI The derivative f a is the instantaneous rate of change of y f x with respect to x When x a Ma h103 Rimmer Interpreting the derivative as a rate of change 3132The Derivative The cost of producing x ounces of gold from a new gold mine is C x dollars What is the meaning of C 39x What are its units change in C E C xmeasures the ratio change in x Ax C 39x is the rate of change of production cost With respect to the number of ounces produced this is called marginal cost The units for C39x are dollars per ounce What does C39800 17 mean C39800 is a ratio so let39s turn 17 into a fraction C 8oo When you are producing 800 ounces of gold and you increase production by l to 801 ounces cost Will increase by 17 92 32009 Se ct I o n 32 Let the number a vary f x liIn fxh fx f 39x can be thought of as a new function it is called the derivative off If f 39a exists then f is called differentiable at a f is called differentiable 0n ab if it is differentiable for all numbers in ab Mzmna 7 nimmev veg 17 3132 the Derivative Find the derivative of the function using the definition of the derivative f xh f x fx4x 7x2 f fxh4xh 7xh2 4x4h 7x22xhh2 fxh4x4h 7xZ l4xh 7h2 fx 4x 7362 fxh fx 4h 14xh 7h2 h4 14x 7h 4 14 7 f x j 01W 1 13414x7h f x4 14x 9232009 g Math 103 Rimmer a 3132 The Derivative Find the derivative of the function using the definition of the derivative x Z fxhfx f 6 fx 1 gf fxhJxl h fxhfx xiii ix 1 1 f x1im m LEW lim W haO h HO h1xxh Zlim x xh Zlim 7 haoh xltxhgtlt 4xu hwltxhgtw m im 1 1 1 LOxxhx xh NJ I 1 f x2x32 om uuuuuuuuuuuuu um 3 Math 103 Rimmer 3132 The Derivative 3 Ways for a function not to be differentiabie at a y y y a A comer b A discontinuity c A vertical tangent emuum mmmmmmmm m a mumquot Hm Math 103 Rimmer 3132The Derivative Match the graph of each function in a d With the graph of its derivative in l IV u l7 quot The main connection function sign of the slope of the tangent line derivative 3 above x7 axis 7 2 below 5 7 axis 0 2 quottouchesquot x 7 axis a sign of the slope of the tangent line 7 7 0 7 7 0 7 7 deriv belowthen 0 then above then 0 then below b sign of the slope of the tangent line 7dne777dne 7 deriv above then jump to below then jump to above c sign of the slope of the tangent line 7 7 0 7 deriv belowthen 0 then above III 9 IV d sign of the slope of the tangent line 70777077077 deriv above then 0 then below then 0 then above then 0 then below a Thnmsan Higher mamquot Math 103 Rimmer have 3132TheDerivakive Animation of the graph of the derivative function httpwwwstewartcalcuuscomtec Module 32 animate 9232009 plotbasic plotting The plot command is probably the command you will use most often in Maple The purpose of this command of course is to produce twodimensional plots The syntax of the plot command in general follows the basic Maple plotwhat how pattern but both the quotwhatquot and the quothowquot can get pretty complicated In the most basic form of the plot statement quotwhatquot is an expression to be plotted and quothowquot indicates the domain on the horizontal axis over which the plot is to be displayed gt restart gt plotxquot2 xx 2 2 Notice here that Maple automatically chose a scale on the vertical axis The scale it chooses is such that the plot over the entire speci ed domain is Visible ie the graph does not quotrun off39 the top of the plot It is possible to restrict the range on the vertical axis as well as follows gt plotxquot2 xx 2 2y 1 2 66 There is another important difference between the two plots above besides the change of scale on the vertical axis namely the vertical axis on the second plot has a label Maple takes the axis labels from the left side of the domain and range specifications It is possible not to give the label for the vertical axis if you don t want it printed If the quotwha quot to plot is an expression the variable in the domain speci cation must be speci ed however This is illustrated by the following gt plotxquot2 xx 2 2 1 2 IIIIIIIIII IIIIIIIII 1 1 2 05 X 1 67 Plotting more than one curve on the same axes It is possible to do this But Maple looks for the first unparenthesized coma in the plot syntax to dilirreate the quotwhatquot from the quothowquot Thus your list of things to plot must be enclosed within braces For example gt plotxquot2xquot3x 2 2y 2 2 2 Common errors in basic plotting The most common syntax error to make while plotting is to forget the braces when you are plotting more than one curve on the same axes Other than syntax errors the most common mistakes to make when plotting involve incorrect speci cation of variables There are two kinds of errors 1 Using a domain value that already has a speci c value It is important to make sure that the variable that is supposed to vary during the plot isn39t already declared to be a constant perhaps in the distant past during the Maple session Making this error results in an error message because Maple thinks you are trying to assign a new value to a constant quotinvalid argumentsquot gtx gt plotxquot2x 2 2 Error in plot invalid arguments Now we reset the value of x so that we don t run into the problem we have just illustrated 68 2 Not specifying a domain variable or specifying the wrong domain variable If your expression involves t then you must let t 2 2 not x 2 2 or whatever the range is This kind of mistake results in the dreaded quotinvalid argumentsquot or quotempty plotquot messages gt plottquot3 x 2 2 Warning unable to evaluate the function to numeric values in the region see the plotting command39s help page to ensure the calling sequence is correct Error empty plot gt plottquot3 2 2 Warning unable to evaluate the function to numeric values in the region see the plotting command39s help page to ensure the calling sequence is correct Error empty plot FAN CIER PLOTTING The plot command is incredibly powerful and versatile All of the ins and outs of plot options take a fair amount of getting used to We will cover a few of them here Plotting points It is possible to have Maple plot points This is often useful when comparing empirical data with a mathematical model There are two ways to do this depending on how the points are generated If you have a list of speci c points to plot you can assign them to a name as follows you may replace the name quotptlstquot with any of your own choosing except those in the list of quotreserved wordsquot gt ptlst121512 12505313506402 gt In this statement the variable ptl st is a list of points Each point is an ordered pair of numbers enclosed in square brackets this is different from the usual convention in mathematics To plot the list we must enclose the entire list in square brackets as follows 69 gt plot ptlst sty1ePOIN39I39 2 o 15 1 o o 05 0 O IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 1 15 2 25 3 4 05 1 0 Maple can use other symbols for the points including circles and boxes The optional phrase symbolcircle or symbolbox is used for this purpose as follows gt plot ptlst sty1ePOINT symbolcirc1e 05 0 o lllIllIIIlllllllllllllllllllllll 5 2 25 3 35 4 O 05 1 o If you replace stylePOINT with styleLINE the dots will be connected by straight lines in the order the points were given this can make for interestinglooking plots if the points are mixed up If the points come from evaluating an expression at several values of x you can use plot in its usual form but specify stylePOINT and a symbol option ifyou like 70 gt plot xquot2 x 2 2 sty1epoint symbolcross show the plot The minimum number of points plotted this way is about 50 You can insist that more points be plotted using the quotnumpointsquot number ofpoints option as follows we do not gt plot xquot2 x 2 2 sty1ePOINT numpoints150 0 o o o 0 0 o 0 o o S 3 S 71 COMBINING PLOTS Labelling Plots Maple39s fanciest specialty plotting functions are contained in a separate library called quot plotsquot For basic plotting there are two commands from the plots library which are especially useful textplot and display To load these two commands into the computer memory use the statement gt with plots textplot display textplot display The display command is useful for combining different kinds of plots into one picture The various kinds of plots that can be combined are standard plots of expressions plots of points plots of text what textplot is for useful for labelling things and animations For example suppose we wish to combine the point plot ofthe variable quot ptlstquot we defined above and a plot of the function sir1 3x To do this we de ne two separate plots assign them to variables and then display them together as follows gt plot1plot ptlst sty1ePOINT symbolcirc1e gt plot2 plotsin3x x0 4 gt When de ning and assigning plots it is very advisable to use a colon rather than a semicolon The thing that gets assigned to the variable plotl and plot2 in these examples is Maple s list of internal instructions for producing the plot a long complicated sequence of computerspeak that is best left undisplayed The display command uses the standard displaywhat how Maple syntax In this case quotwhatquot is a set of quotplot structuresquot and quothowquot is often an expression ofthe form view a b c d which speci es the horizontal and vertical ranges to be displayed gt displayplot1plot2 view0 4 1 2 72 Another reason to use display is to attach labels to objects in your plots You do this by putting the labels in a separate plot called a textplot The textplot command takes as its argument a single or a set of quottext objectsquot all ofwhich look like a b words it places the words inside the quotes they are both left quotes on the keyboard to the left of the numeral 1 on the plot so that they are centered at the point ab To see this at work we plot a function and its derivative and label them on a graph gt y1xquot2 exp xquot22 ddiffyx gt Fplotydx 3 3 gt Gtextplot 1 1 function 0 75045 derivative gt displaw FIG function derivative lll 2 llllllllll 3 2 3 1 Optional special topic A word about plotting functions as opposed to expressions and one situation in which it is a good idea Sometimes you will have the relationship you 73 want to plot in the form of afunction rather than an expression for example gt f x gtxquot3exp x In such a situation you can simply plot f x which is an expression using the information given above Alternatively you may use plot in the following form gt plotf03 Olllllllllllllllllllllllllllllll 0 05 1 2 3 Usually there is no particular reason to favor one version of plot over the other However it is imperative not to confuse them Neither statement gt plotfx 0 3 Warning unable to evaluate the function to numeric values in the region see the plotting command39s help page to ensure the calling sequence is correct Error empty plot nor gt plotfx03 Error in plot invalid plotting of procedures perhaps you mean plotf 03 will work correctly The one situation in which functionplotting is de riguer is when you have defined a function that contains an quotifthenquot clause a stepfunction or piecewisedefined function For example 74 gt fx gt if xlt3 then x1 else x lquot2 fi This function is equal to x1 if is less than 3 and is equal to x l quot2 otherwise Ifwe try to plot it ths usual way we will get an error message gt plotfxx0 5 Error in f cannot determine if this expression is true or false This is because Maple attempts to understand the function before it has a value for X On the other hand the following way will work gt plotf05 16 14 12 10 incidentally from the plot we can see that f is probably continuous but not differentiable at X3 Plotting options There are many options you can invoke when doing plots so that you can make the plot look like you want it For example you can control the color of a graph with the quotcolorquot option Maple knows many colors for instance quotcolorredquot or quotcolorgreenquot or make the curves plot thicker with the quotthicknessquot option the plots above all use the default quotthicknesslquot but you can use bigger integers than 1 to get thicker plots Another useful option is quotscalingconstrainedquot which tells Maple to use the same scale on the X and y axes this makes circles look like circles rather than ellipses and the slopes of lines are really what they appear to be Here is a plot that uses all of these options gt plotxquot2x 22colorb1ueh39i 3r393939i inns I 75 76
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'