20 Pages

m242tutorial

Course: M 242, Fall 2009
School: Delaware
Rating:
 
 
 
 
 

Word Count: 6532

Document Preview

TUTORIAL MAPLE FOR MATH 242 Rakesh August 30, 2006 Contents 1 COMMANDS FOR MATH 242 MATERIAL 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 Dierentiation, Integration, Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . Destroying or Starting a Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manipulating Windows Getting Help in Maple .....................................

Register Now

Unformatted Document Excerpt

Coursehero >> Delaware >> Delaware >> M 242

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
TUTORIAL MAPLE FOR MATH 242 Rakesh August 30, 2006 Contents 1 COMMANDS FOR MATH 242 MATERIAL 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 Dierentiation, Integration, Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . Destroying or Starting a Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manipulating Windows Getting Help in Maple .................................. .................................. 2 2 3 3 3 4 4 4 6 6 7 9 Quitting Maple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Substituting values into expressions, Numerical value of an expression . . . . . . . . Time Saving Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupting Maple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Some Common Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.10 Plotting Planar Curves - I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.11 Exact Solution Of Systems Of Equations . . . . . . . . . . . . . . . . . . . . . . . . . 1.12 Approximations Of Solutions Of Equations . . . . . . . . . . . . . . . . . . . . . . . 10 1.12.1 Using the avoid option with fsolve . . . . . . . . . . . . . . . . . . . . . . . . 12 1.13 Commands Longer Than A Single Line . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.14 Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Version 10.00 Please send suggestions and corrections to rakesh@math.udel.edu 1 1.15 Finite sequences and series, Taylor Polynomials . . . . . . . . . . . . . . . . . . . . . 14 1.16 Manipulating Expressions, Extracting Parts of Expressions . . . . . . . . . . . . . . 14 1.17 Plotting Planar Curves - II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.18 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.19 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2 PREPARING A MAPLE REPORT 19 1 COMMANDS FOR MATH 242 MATERIAL The commands given below have been tested only for the Worksheet Mode of Maple. 1.1 Dierentiation, Integration, Editing Start Maple. To dierentiate sin(x2 ) type diff( sin(x^2), x); hit Return The , , , keys may be used to navigate in the worksheet and the Backspace, Delete keys may be used to correct typing errors. Dont forget the semicolon - every command ends with a semicolon. To compute denite and indenite integrals use int( sin(x), x= 0..Pi ); int( a*x^2, x ); and hit Return and hit Return Note that Pi (upper case P) is the symbol used for in Maple. The rst command computes the denite integral and the second command computes the indenite integral. Notice, in the second command, ax2 could have been integrated with respect to x or a. One convenient editing trick is the following. Suppose we wish to dierentiate x sin(x3 ). We have already dierentiated sin(x2 ) - so using the , keys on the right hand side of the keyboard, move the cursor to that line. Then using the Backspace, Delete, and arrow keys modify that line to read diff( x*sin(x^3), x); and hit Return We now continue with other Maple commands - move the cursor to the last line using the , , , . To compute higher order derivatives note the example below 2 f := sqrt(1+x) + 3*exp(x) - ln(1+x^2); diff(f, x$3); Here we rst dene an expression f and then we compute its third derivative (note the x$3). Also note the use of the square root function, the exponential function, and the natural log. DO NOT use e^x for the exponential function. 1.2 Destroying or Starting a Worksheet To start a new worksheet, because you want to work on a new problem, left click the File menu and in the new menu which pops up left click the New line and choose Worksheet Mode. You will get a new worksheet called Untitled 2. To destroy the old worksheet called Untitled 1, click the button associated with Untitled 1 in the top left corner. Reply No to the question about saving the old worksheet. 1.3 Manipulating Windows Open a Maple worksheet if you dont have one. To plot the graph of the function x2 over the range 1 x 1, type plot( x^2, x=-1..1 ); This will result in the plot of y = x2 over 1 x 1. The plot may be manipulated - click on the plot and a box appears around the plot; move the mouse arrow to the bottom right corner of the plot box and the arrow will turn into another shape; holding down the left mouse button drag that corner till you have resized the plot to your liking. From the Plot menu at the top, choosing the Scaling Constrained option will result in a plot in which the scale used in the x and the y direction are the same - the default is unconstrained scaling where the scales chosen are those which ll the box with the plot. The menu appearing on the main Maple window depends on whether the plot box is active or not. Click on the plot command line and notice that the headings in the main Maple window change. Click on the plot again and see the change. 1.4 Getting Help in Maple Maple has an excellent help facility. Suppose you wish to nd out the Maple command to simplify an expression. Move to the the last Maple command line and type ?simplify and a separate window pops up giving information about the simplify command. The most useful part of this help window are the examples at the bottom - scroll down to see them. Also useful is 3 the line at the end which says See Also - this mentions other commands which may be appropriate. You can get information on any of the commands listed there by clicking on that word; for example, click on collect and analyze the examples at the bottom of the help window - seems like a useful command. When you are done with the Help windows you can either destroy it or iconify it for later use. Destroy the Help window now. Help is also available from the menu at the top of the main Maple window - you can explore this further later. 1.5 Quitting Maple To quit Maple, from the File menu choose Exit; answer No to prompts for saving this work (later we will see how to save your work). This will get you out of Maple. 1.6 Substituting values into expressions, Numerical value of an expression Start Maple if you do not have a Maple window. To substitute a value for a variable in an expression use the command eval. To obtain a numerical value of an expression use evalf. We show their use by an example. We compute the third order x derivative of x2 sin(kx3 ) at x = 1, k = 3, accurate to 7 digits. Try fxxx := diff( (x^2)*sin(k*x^3), x$3 ); computes 3rd order derivative myval := eval( fxxx, {x = 1, k = 3} ); evaluate fxxx at x=1, k=3 evalf( myval, 7 ); obtain numerical value of myval accurate to 7 digits evalf is the Maple command to obtain a numerical value for an expression and the answer is calculated accurate to 7 digits. To obtain greater accuracy change 7 to a higher number - say 9; try it. Note the use of curly parenthesis { and } , in eval, to specify all the variables that are being replaced. 1.7 Time Saving Tricks Start Maple if you dont have a Maple window. Use space between characters judiciously, not too much and not too little, to make error detection easier. The following three lines do exactly the same thing (substitute values for variables in an expression) but the rst is preferred over the other two. In the rst line, note how the command, the expression and the variables are judiciously spaced so that the dierent units stand out. eval( sin(x+y), {x=2, y=3} ); eval(sin(x+y),{x=2,y=3}); eval( sin(x+ y), {x =2,y =3} ); 4 Good correct but terrible correct but room for improvement If the output of a certain calculation is to be used later, it is best to give it a name and choose a meaningful name. For example, myder := diff( x^2, x ); int( myder, x ); Occasionally Maple responds to a command with "syntax error". e.g. try diff( x^3 + 3x^2 - x, x ); Maple responds with the error message. Also note that it points to the probable source of the error. Can you determine the error? The error is that 3x^2 should have been entered as 3*x^2. Now instead of retyping the line it is quicker to correct the old line by using the arrow keys; then hit Return. Remember modify only the red colored lines and never retype a line - it is usually faster to correct the incorrect line. To use part of an old command one can use the copy and paste technique. Type diff( sqrt(1+x) + x*exp(x) + ln(1+x), x ); Hit Return Now suppose we want to integrate the same function 1 + x + xex + ln(1 + x) from 2 to 5. Instead of retyping this expression we copy it. Highlight the expression to be copied (in the red colored part); then from Edit choose Copy (not Cut). Next, using the arrow keys, move the cursor to a new line, and try int( from Edit menu choose Paste, x = 2..5 ) ; You should obtain int( sqrt(1+x) + x*exp(x) + ln(1+x) , x = 2..5 ) ; Hit Return In Maple, several commands may be executed together. This is particularly convenient if the desired output is the result of several commands and one is not interested in the intermediate results. For example, we will compute the value of d x3 sin(kx) dx when x = 2, k = 4, accurate to 9 digits. a := diff( sin(k*x)*x^3 , x ); b := int( t*cos(t+k), t=1..3 ); c := eval( a+b, {x=2, k=4} ); evalf(c, 9); while pressing Shift hit Return while pressing Shift hit Return while pressing Shift hit Return Hit Return 3 + 1 t cos(t + k) dt All the commands are executed together and the last result is the desired answer - make sure you understand why the last result is what we wanted. The problem was broken into several parts then combined to get the nal result. 5 In the previous problem, we were not really interested in the intermediate values a, b, c. In Maple one can suppress the output of a command by replacing the semicolon by a colon. In the previous commands replace the semicolon ; by a colon : for the rst three commands only - these are the intermediate commands whose output does not interest us. Now hit return and note the output. Compare this with the earlier situation by putting back the semicolons. Now is a good time to do the exercises below. They are quite straightforward and will help you assimilate the commands and ideas we have discussed so far. Exercise 1.1 Compute the fourth derivate of cos(x + 1) + ln(x 1) + xex +1 with respect to x. Also compute the integral of the original function with respect to x over the interval [2, 4] - do not retype the expression to be integrated. Exercise 1.2 What is the value of eu+v + u2 sin(uv) when u = 3, v = 2? Obtain this value accurate to 12 digits. What is the value of sin 3 accurate to 9 digits? All trigonometric angles in Maple are in radians (and not degrees) by default. Exercise 1.3 Using Maple determine the sine of 20 degrees, accurate to 10 digits. Hint: convert degrees to radians and then apply the sine function. Answer: 0.3420201433 . Exercise 1.4 Determine the value of the following expression when p = 3, q = 1, accurate to 10 digits. p d p q 3 sin(p q) + (p q + 1) eq u2 sin(p u) du dq q Answer: 8.73549981 . 2 2 1.8 Interrupting Maple If Maple gets stuck in a calculation to stop the calculation left click the STOP button. e.g. type sum( sin(n^2), n=1..10^7 ); Hit Return This attempts to nd the sum of sin(n2 ) as n ranges from 1 to 107 . This will take too long so to stop the calculation left click the red hand stop button at the top of the window. 1.9 Some Common Errors Do not type xy when you really want x y, or type cos x when you want cos(x). 6 A common mistake is the inappropriate use of the solve command. The solve command is useful only for solving equations (explained later) - it is useless/incorrect to use it for simplifying expressions (use simplify) or obtaining numerical values for expressions (use evalf). A common error is to use a symbol as a variable even though the symbol was assigned a value earlier. For example, suppose at some stage you used x := 4; and you forgot about it. Some commands later you dierentiate sin x expecting cos x but instead you get an error message because x has the value 4. One clears the value of x is shown below. Try x := 4; diff( sin(x), x ); Error x := x; use quote key right of semicolon key, this clears value of x diff( sin(x), x ); now it works as you want it to Since the commands in a Maple worksheet are often modied and then rerun, it is a good idea to start every worksheet with the restart command. Execute the following commands diff( sin(x), x); diff( cos(y), y); x := 4; Now reexecute each of the commands by just hitting Enter. You will notice a problem with the rst command. That is so because Maple remembered that x = 4 from the third command so in the rerun the rst command does not make sense. So try the following - move the cursor to the rst line, then from Insert choose Execution Group choose Before Cursor and you should have a new execution group as your rst line. In that line type restart; and then reexecute the next set of commands and there should be no problem. 1.10 Plotting Planar Curves - I Planar curves may be given explicitly as in y = x2 (a parabola), implicitly as in x2 + y 2 = 1 (a circle), or in parametric form as in x = t + sin t, y = 1 cos t, 6 t 6 (a cycloid). Curves may also be given in polar form as in the three leaved rose r = sin(3). To draw the graph of the explicitly given curve y = x2 + 9 sin x over the interval [3, 3] use plot( x^2 + 9*sin(x), x=-3..3 ); To draw the graph of two (or more) explicitly given curves y = x x2 and y = 1 2x over the interval [0,1], in the same window, with y = x x2 colored red and y = 1 2x colored blue, use plot( [x-x^2, 1-2*x], x=0..1, color=[red,blue] ); 7 To determine the point of intersection of the two curves in 0 < x < 1, left click the point of intersection to obtain its approximate location as (0.38, 0.23) - this is displayed in the box in the left corner of the main window. To draw curves given implicitly ( i.e. they are not given in the form y = f (x), but in the form g(x, y) = c ) use the implicitplot command. However, this command is in the plots package; so to draw the ellipse x2 + 4y 2 = 4 use with(plots); Load the plots package - only once in a worksheet implicitplot( x^2 + 4*y^2 = 4, x=-3..3, y=-3..3 ); Note that for implicitplot, both the x and y ranges have to be given. implicitplot plots the part of the curve which lies in the rectangle determined by the x and the y ranges. Compare this with plotting using the plot command (for example to plot y = x2 ) where only the x range is required. Examine what happens if you increase or decrease the ranges for x and y - try several changes. For implicitplot, it is advisable to start with a large range and then decrease the range until the graph is satisfactory. To draw more than one implicitly given curve, for example, the ellipse x2 + 4y 2 = 4 and the circle x2 + y 2 = 2, with ellipse blue and circle colored green, use implicitplot( [x^2 + 4*y^2 = 4, x^2 + y^2 = 2], Shift Return x=-3..3, y=-3..3, color=[blue, green] ); Again the approximate locations of the points of intersection may be read with the help of the mouse. Some remarks are in order here. Curves which can be plotted using plot may also be plotted using implicitplot but not vice versa. Wherever possible use plot instead of implicitplot because plot is faster and gives more accurate graphs. Notice the use of the curly brackets [ ] when plotting two or more curves - all the equations/functions being plotted must be enclosed in these square brackets. These square brackets are not necessary (but may be used) when plotting a single curve. To superimpose two plots (obtained from dierent commands) use the display command in the plots package. For example, to display the graphs of y = x2 , y = 2x, and the circle x2 + y 2 = 1 in the same picture, use with(plots): pic1 := plot( [2*x, x^2], x=-2..2, color=[red, blue] ); pic2 := implicitplot( x^2 + y^2 = 1, x=-2..2, y=-2..2, color=green); display( {pic1, pic2} ); The second and third lines dene two graphs named pic1 and pic2. The last line displays the two pictures - superimposed. 8 1.11 Exact Solution Of Systems Of Equations To obtain solutions of one equation in one variable or to nd the solutions of a system of equations, the solve command is useful. To nd all solutions of the quadratic equation x2 3x + 2 = 0, use solve( x^2 - 3*x + 2 = 0, x ); In the command solve, the rst parameter is the equation to be solved and the second parameter is the variable to be solved for. To solve the system of equations x + y = 1, x2 y = 1, for the variables x, y, use solve( {x + y = 1, x^2 - y = 1}, {x,y} ); and we obtain the two sets of solutions. Now consider the following example - nd all solutions of 3x 2y = 5, x2 y 3 = 2. As before, we use mysol := solve( {3*x - 2*y = 5, x^2 - y^3 = 2}, {x,y} ); where mysol is the name given to the list of solutions generated. The solutions are {x = 1, y = 1} and x = Z, y = 3Z/25/2 where Z is one of the roots of the quadratic equation 9Z 2 13Z 7 = 0. Now the quadratic equation has two solutions - so there are two choices for Z. To obtain both these solutions coming from the Z, we rst isolate the part containing Z. Try mysol[1]; mysol[2]; first part of mysol second part of mysol So mysol[2] contains the terms dependent on Z. To get all the solutions (that is expanding the Rootof part) apply the allvalues command to mysol[2] . othersolns := allvalues( mysol[2] ); So we have the other two solutions of the system of equations - giving a total of three solutions. To obtain the numerical values of the other two solutions accurate to 5 digits, we can apply evalf evalf( othersolns, 5 ); Often the solutions of a system of equations are to be substituted in another expression. This can be done very eciently as shown below. Suppose we wish to nd the value of ln(x2 + y 2 ) at the solution of above system which lies in the rst quadrant (that is x > 0 and y > 0). Of the three solutions obtained above, it is the x = 2.9080, y = 1.8621 solution which lies in the rst quadrant. So one could use 9 eval( ln(x^2+y^2), {x=2.9080, y=1.8621} ); However, this is not quite correct and also inecient. Firstly, x = 2.9080, y = 1.8621 is only an approximation to the solution, the correct solution being y = 13/18 + 421/18, x = , so we should be substituting this into ln(x2 + y 2 ) and not its numerical approximation. The second more important issue is that one should not have to retype results which Maple has generated - instead the result should be given a name and the name should be used. In our case, the solution of interest is othersolns[1], try othersolns[1]; Note that the solution is already in the form x = , y = , exactly the form needed for using the command eval, so a more ecient way of getting the value of ln(x2 + y 2 ) at this solution would be myval := eval( ln(x^2+y^2), othersolns[1] ); evalf( myval, 10 ); numerical value Please try the exercise below before moving the to next section. The ideas in this section are very useful. Exercise 1.5 Find the numerical value of sin(x2 + x) where x is the positive root of the equation x3 + 3x2 = 2. Answer : 0.9544912329. Exercise 1.6 Evaluate x3 + exy at the solution of y = x + 1, x2 + y 2 = 4 which lies in the rst quadrant. Ans: 5.038878215 . 1.12 Approximations Of Solutions Of Equations To nd all solutions of the equation 7 cos x + x + x2 = 15 try solve( 7*cos(x) + x + x^2 = 15, x ); Maple tries to nd the exact solutions and fails. So we attempt to obtain the approximations to these solutions using the command fsolve. First we must nd out how many solutions this equation has. For large |x|, 7 cos x + x + x2 is very large and hence will not equal 15. Hence the equation will not have a solution x for which |x| is large; so the solutions of 7 cos x + x + x2 = 15 are in a nite interval. The solutions of 7 cos x + x + x2 = 15 are solutions of 7 cos x + x + x2 15 = 0, that is the values of x where the graph of 7 cos x + x + x2 15 cuts the x axis (WHY?). So we plot the graph of 7 cos x + x + x2 15 over a reasonably large interval. 10 plot( 7*cos(x) + x + x^2 - 15, x=-10..10 ); From the graph, using the mouse, we observe that the graph cuts the x axis at two points - hence the equation has two solutions, one between 5 and 4, and the other between 3 and 4. To nd these solutions we use the fsolve command. So we can obtain the approximate value of the two solutions using fsolve( 7*cos(x) + x + x^2 = 15, {x}, x=-5..-4 ); fsolve( 7*cos(x) + x + x^2 = 15, {x}, x=3..4 ); The fsolve command needs the equations and the variables just as solve but fsolve also needs an interval which encloses a solution. When using fsolve it is important to choose an interval which contains only the solution one wants - the narrower the interval the better. This is usually done by rst plotting the appropriate graphs - so always draw the appropriate graphs before using fsolve. Finally, to complete the solution of the problem we must show somehow (using pencil and paper) that 7 cos x + x + x2 = 15 has no solutions outside [10, 10]. That takes some eort and we will skip that. Exercise 1.7 Find all the solutions of x2 + 2x + x sin x = 4. Check your answer by substituting these values of x into the equation. We now study how to nd solutions of systems of equations for which solve fails to work. Consider the system of equations x2 + y 2 = 4 and sin(x + y) + cos x = 1. If we try solve( {x^2 + y^2 = 4, sin(x+y) + cos(x) = 1}, {x,y} ); then Maple is unable to nd the exact solutions. We plot the two curves x2 + y 2 = 4 and sin(x + y) + cos(x) = 1 and the solutions of this system of equations are the points which lie on both the curves. with(plots); unnecessary if already done once this session implicitplot( [x^2 + y^2 = 4, sin(x+y) + cos(x) = 1], x=-3..3, y=-3..3 ); Using the mouse, we note that the system has two solutions (in the rectangle [3, 3] [3, 3]) one near (1, 1.6) and the other near (1, 1.7). The system will not have any solutions outside the rectangle [3, 3] [3, 3] - WHY? To nd these solutions more accurately use fsolve( {x^2 + y^2 = 4, sin(x+y) + cos(x) = 1}, {x,y}, x=-2..0, y=0..2 ); fsolve( {x^2 + y^2 = 4, sin(x+y) + cos(x) = 1}, {x,y}, x=0..2, y=0..2 ); 11 Again, fsolve needed the system of equations, the variables to be solved for, and the range over which the search for the solution is to be conducted. The ranges for x and y were chosen carefully - using the graph, they were chosen to include only one solution at a time. So again, plot the appropriate curves before using the fsolve command (to help determine the ranges to be used in fsolve). 1.12.1 Using the avoid option with fsolve The graphical technique, of obtaining the rectangle containing the solution we want, fails in three and higher dimensions (i.e. solving k equations in k unknowns with k 3) because the graphs are hard to visualize in three dimensions and non-existent visually in higher dimensions; however, fsolve will still work. sol1 := fsolve( {x^2 + y^2 + z^2 = 4, x+y+z=0, x*sin(y*z)=-1}, {x,y,z}, x=-2..2, y=-2..2, z=-2..2 ); gives one solution of the system of equations. Is it the only solution? How do we nd others if there are any? Maples solve command has an option where it nds solutions which avoid certain specied solutions. Try sol2 := fsolve( {x^2 + y^2 + z^2 = 4, x+y+z=0, x*sin(y*z)=-1}, {x,y,z}, avoid = sol1 ); Shift Return Shift Return which gives a solution dierent from sol1. Are there more solutions? We try sol3 := fsolve( {x^2 + y^2 + z^2 = 4, x+y+z=0, x*sin(y*z)=-1}, {x,y,z}, avoid = {sol1,sol2} ); Shift Return to nd solutions which avoid sol1, sol2 and it seems that there are none. Use ?fsolve/details to nd about other options for fsolve. Exercise 1.8 Find all solutions of x2 + y 2 = 9, x3 + y 3 sin(xy) = 7. Why are you sure that there are no more? Answer: There are two solutions. 1.13 Commands Longer Than A Single Line As we saw in the previous example, some commands need more space than a single line. To split up a command over several lines do as below solve( {x+y+z=2, x+2*y+3*z=7, x-2*z=10}, {x,y,z} ); 12 holding down Shift press Return 1.14 Procedures So far we have used expressions instead of functions. For example, if we want to work with the function x3 + sin x then we have chosen to use p := x^2 + sin(x) ; However, the p dened above is an expression and not a function. If we want the value of that expression at some point then we use the eval command. A better way may be to dene a Maple function or procedure as f := proc(x) x^2 + sin(x) end ; Shift Return Shift Return Every Maple procedure has the form name of procedure := proc( variables separated by commas ) value of the function end ; Given next is an example of a procedure dependent on two variables g := proc(x,a) x^3 + a^3 + x*sin(a) ; end; Shift Return Shift Return Return Examine the following use of the procedures f and g carefully and make sure that the output of each command is what you expect it to be. f(2); exact value of f at x=2 f(2.0) ; numerical value of f(2) fp := D(f); fp is the derivative of f - it is also a procedure. D(f)(3); exact value of derivative of f at x=3 D(f)(3.0); numerical value of derivative of f at x=3 plot(f, -2..2); graph of f over the interval [-2,2] g(2,1); exact value of g at x=2, a=1 g(2.0, 1.0); numerical value of g at x=2, a=1 D[1](g); D[2](g); Procedures are very useful in implementing algorithms. We will see the use of procedures when implementing Newtons method and Simpsons rule. 13 1.15 Finite sequences and series, Taylor Polynomials To nd the sum of the series 69 n=5 sin n 1 + 3n2 accurate to seven digits, use a := Sum( sin(n)/(1+3*n^2), n=5..69 ); evalf(a,7); The rst statement assigns a the sum of the series; the second obtains a 7 digit numerical value for a. The upper case S in the Sum command tells Maple to return only the symbolic sum. Repeat the above commands after replacing Sum by sum - see what happens. A command useful for generating sequences of numbers, expressions, etc., arising from one formula is seq. Observe the result of executing the following statements seq( i^2, i=3..7 ); seq( i^2, i={3,4,10,20} ); seq( sin(k*x), k=1..4 ); For example to plot the graphs of sin x, sin(2x), , sin(5x) over the interval [, ] one could use funs := seq( sin(k*x), k=1..5 ); plot( [funs], x=-Pi..Pi ); Of course, it would be nicer if we knew which graph corresponded to which function. This may be done as follows - click on the plot, and then from the Legend menu choose Show Legend and the graphs are labeled. The Maple command to nd the Taylor expansion of a function is mtaylor. To nd the Taylor expansion of ln x around x = 1 of order 6, use mtaylor( ln(x), x=1, 7 ); use 7 to get expansion up to order 6 1.16 Manipulating Expressions, Extracting Parts of Expressions Maple has many commands to manipulate algebraic expressions. A few of them are collect, expand, simplify, combine - use the ? to nd out more about them. To extract parts of an expression two useful commands are op and nops. Consider the expression (x + py)3 + (2x y)(3x2 + y 2 px). If we want the expansion of this in powers of x and y then we would use 14 restart: f := (x+p*y)^3 + (2*x-y)*(3*x^2 + y^2 - p*x); g := simplify(f); if simplify had not worked we would try expand h1 := collect(g, x); h2 := collect(g, {x,y}); h3 := collect(g, {x,y}, distributed); Note the three dierent ways of collecting the terms in g (or f); h1 organizes the terms of g by powers of x alone ignoring the powers of the other variables; h2 organizes the terms of g rst by powers of x and then the coecients of each power of x are organized by powers of y; where as in h3, g is organized in powers of x and y as a polynomial (or more correctly a multinomial). Each of these representations is useful depending on what we use we have in mind. Expressions may be organized not just in powers of x but in powers of any expression. Try k := (x+sin(x)) * (3*x + sin(x)) + (2*sin(x) + x)^2 ; collect( expand(k), sin(x) ); Now we reexamine the expression h3 obtained earlier. We will extract various pieces of h3. Suppose we want to extract an expression which consists of the rst three terms in h3 and another expression which consists of the rest of the terms in h3. We will be using two commands - nops(a) which counts the number of terms/operands in the expression a, and op(k,a) which returns the kth term/operand of the expression a. So h3; just to see the expression nops(h3); counts the number of terms in h3 (not needed) op(1,h3); first term in h3 (not needed) op(2,h3); second term in h3 (not needed) a := op(1,h3) + op(2,h3) + op(3,h3); the first three terms of h3 b := h3 - a; the rest of the terms of h3 To extract all the coecients of the various powers of x, y in h3 use coeffs(h3, {x,y}); It is a little trickier to get just the coecient of a single term such as x2 y. We use Maples coeff command which works only on expressions expanded in terms of one variable. h3; just to see the expression, not necessary t1 := collect(h3, {x,y}); expand h3 in powers of x (then coeff in powers of y) t2 := coeff(t1, x^2); extract terms which have an x^2 t3 := coeff(t2, y); extract term with y - hence the x^2 y term is extracted Exercise 1.9 Consider the expression (ax2 + bx sin y + c sin y)2 + (a sin2 y + bx)3 15 i) Write the above as a polynomial in x and extract the coecient of x2 . Ans : b2 (3a + 1) sin2 y + 2ac sin y ii) Write the above as a multinomial in the variables x and sin y and extract the coecient of x sin2 y. Ans : 2bc. 1.17 Plotting Planar Curves - II We now learn the commands for plotting planar curves given in parametric form or in polar coordinates. To draw curves given in parametric form one still uses the plot command. For example, to plot the cycloid x = t + sin t, y = 1 cos t use plot( [t+sin(t), 1-cos(t), t=-6..6] ); where the range t = 6..6 was chosen somewhat arbitrarily. What happens if you change the range for t - try it. Also, the location of the range of t=-6..6 on the command line is very important. If the part t=-6..6 is moved out of the [ ] then the graphs obtained are dierent. Try plot( [t+sin(t), 1-cos(t)], t=-6..6 ); You will obtain the graph of two curves y = t + sin t and y = 1 cos t as t varies over [6, 6] - see the section 1.10 where this was discussed. To draw the two (or more) parametric curves, the cycloid x = t + sin t, y = 1 cos t, and th...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Delaware - M - 242
Seventh Lab For M242, Summer 2000Topic : In this lab we learn tools which will help visually examine how well truncated power series approximate functions. From results for geometric series we saw in class that 1 = 1 + x + x2 + x3 + = xk 1x k=0
Delaware - M - 242
First Lab For M242, Summer 2000The lab is due on Thursday, June 8, 2000. You may have oral discussions with any one in this section but the Maple work must be your own. Absolutely no work is to be shared. Please be warned, all parties to any violati
Delaware - M - 242
Ninth Lab For M242, Summer 2000Due on Thursday, July 6, 2000Topic : Solving systems of equations. Plotting curves given in parametric form or in polar coordinates.Problem 1Read Section 1.12 of the tutorial, paying particular attention to the all
Delaware - CIS - 105
x ! x = 40 % 6 / 2 + 6 / 3 1; 6 x x x x x x 1 2 4 3 5 x = 3= 40 % 6 / 2 + 6 / 3 1; = 4 / 2 + 6 / 3 1; = 2 + 6 / 3 1; = 2 + 2 1; = 4 1; = 3;&quot;! x = (10 5 / 5 % 1) * 3; 5 x x x x x # 'y=3 (10 (10 (10 (124x = 30= = = = = 5 / 5 %
Delaware - CIS - 105
CISC 105General Computer ScienceSummer 2004HW2 Due Monday, June 21st1. Write a program that prints the numbers 1 to 4 on the same line using the following methods: (a) Using one printf statement with no conversion specifiers (b) Using one prin
Delaware - CIS - 101
CISC 101 Computers &amp; Information Systems Winter 2003Meeting Times: Lecture MW 9:45 am - 12:00 pm Lab TR 9:45 am - 1 pm Instructor: Emily Gibson TA: Ryan Bickhart Office: 102 Smith Hall Office: Smith 040 Hours: Mondays 1:00 pm 3:00 Hours: Tuesdays 1
Delaware - CIS - 101
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt; &lt;!DOCTYPE html PUBLIC &quot;-/W3C/DTD XHTML 1.0 Strict/EN&quot; &quot;http:/www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt; &lt;html xmlns=&quot;http:/www.w3.org/1999/xhtml&quot; lang=&quot;en&quot; xml:lang=&quot;en&quot;&gt; &lt;head&gt; &lt;title&gt;Object not found!&lt;/
Delaware - CIS - 105
CISC 105General Computer ScienceSummer 2004HW2 Due Monday, June 21st1. Write a program that prints the numbers 1 to 4 on the same line using the following methods: (a) Using one printf statement with no conversion specifiers (b) Using one pr
Delaware - CIS - 105
CISC 105General Computer ScienceSummer 2004HW1: Development Environment BasicsDue Thursday June 10thI. UNIX How do you accomplish the following in UNIX: 1. 2. 3. 4. 5. 6. 7. 8. Change to your home directory? Create a new folder? Delete a fi
Delaware - CIS - 105
CISC 105 General Computer Science Summer 2004Meeting Times: Lecture M Lab R 6:00 pm 9:30 pm 7:00 pm 9:00 pm TA: Frank Lee Office: Hours: Email: flee@cis.udel.edu Instructor: Emily Gibson Office: 102 Smith Hall Hours: Mondays 3:00 pm 5:
Delaware - CIS - 101
Dye Sub Printers ExplainedDye sublimation printers (also known as &quot;Dye Diffusion Thermal Transfer Printers&quot;) are known for their high quality photographic output. As the technology continues to be improved, dye sublimation printers are bringing cost
Texas A&M - ELEN - 449
Lab # 8 A/D Converter and Interrupt ProcessingIntroduction In this lab, we interface an Analog-to-Digital Converter (ADC) to our ISA prototype card. We modify the ABEL source and program our CPLD to generate a conversion clock, chip select, and int
Texas A&M - ELEN - 449
Lab # 5 - I/O Latch Interfacing and Timing ConsiderationsIntroduction In this lab, we learn to program the Lattice MACH 64/32 device with the JEDEC file we created in the last lab using the Lattice ispVMsystem tool. We learn how to use the Oscillosc
Texas A&M - AGECON - 429
AGEC 429: AGRICULTURAL POLICYLECTURE 8: C U 8 GENERAL POLICY INSTRUMENTS IAGEC 429 Lecture 8GENERAL INSTRUMENTS OF FARM POLICYPART I: GOVERNMENT SURPLUS PURCHASE PROGRAM General Format for Discussion of Instruments:1. 2. 3. What is it and how
Delaware - SOCI - 836
Journal of Quantitative Criminology, Vol. 16, No. 1, 2000Poisson-Based Regression Analysis of Aggregate Crime RatesD. Wayne Osgood 1This article introduces the use of regression models based on the Poisson distribution as a tool for resolving co
Texas A&M - RPTS - 1990
Delaware - CH - 311
CHAPTER 9 NET PRESENT VALUE AND OTHER INVESTMENT CRITERIAAnswers to Concepts Review and Critical Thinking Questions 1. A payback period less than the projects life means that the NPV is positive for a zero discount rate, but nothing more definitive
Idaho - ECE - 520
Idaho - ECE - 520
Idaho - ECE - 520
Idaho - ECE - 504
ECE 504Power System Stability IISession 27 P-V and Q-V CurvesP := 0.2 Q := 0.2E := 1.0X := 1.0VR := 0.6 Given P= E VR X E VR X sin( ) := 20 degQ= cos( ) -VR X2 VR := Find( VR , ) VR = 0.632 = 18.435 degP := 0.2
Idaho - ECE - 504
Idaho - ECE - 504
Idaho - ECE - 504
Lecture 31 ECE504PS Spring 2007 Goals of this lecture are to: 1. Review HW 2. Introduce expanded system 3. More Nomograms 4. Define performance table for our class 5. HW assignment Review HW Our HW was to add damping criteria to Transaction Analysi
Idaho - ECE - 504
ECE 504 Power System StabilityOut-of-Step ProtectionSession 33d RevisedEg = Egm ej Xe := 0.25Xs := 0.753Vs = Vsm ej 0 deg+ jXe + + Eg V -VD jXs I-+ VS -XT = Xe + Xs Eg = VD + Vs = j XT I + Vs Eg Vs j XTI=V = Vs + j Xs I
Idaho - ECE - 504
ECE 504 ST: Power System StabilityExample 12.3University of Idaho Session 38ckVA := kWMVA := 10 W6rev := 1j :=-1m := 10-3Example 12.3ORIGIN := 1 All values are in pu unless noted otherwise. Xqu := 1.76 Tdop := 8.0 sec Bsat :
Idaho - ECE - 423
Idaho - ECE - 423
Idaho - ECE - 423
University of Texas - SHIMM - 59034
Copyright by Mi-Suk P. Shim 2004The Dissertation Committee for Mi-Suk P. Shim certifies that this is the approved version of the following dissertation:Predictors of Children's Violent Media UseCommittee: _ Elizabeth A. Vandewater, Supervisor _
University of Texas - SHIND - 94494
Copyright by Heeju Shin 2008The Dissertation Committee for Heeju Shin certies that this is the approved version of the following dissertation:Female-Headed Households, Living Arrangements, and Poverty in MexicoCommittee:Bryan R. Roberts, Supe
Maryland - ENCE - 203
ENCE 203 Computational Methods in Civil Engineering II Spring 2002 Professor GabrielHomework #14 [Last Homework!] Assigned: Monday May 6, 2002 Due at start of class: Monday May 13, 2002 Note: 1. Exam #4 will cover the topic of curve fitting covered
Maryland - ENCE - 667
! Toy Production LP, LINDO formulation!Dr. Steven A. Gabrielmax 3x1+2x2 !objective functions.t.2x1+x2&lt;=100 !finishing constraintx1 +x2&lt;=80 !carpentry constraintx1 &lt;=40 !limited constraint on soldiersend! nonnegative variables as
Maryland - ENCE - 725
Presentation Schedule ENCE 725/AMSC 698J Probabilistic Optimization Fall 2005 Monday December 19, 2005 Note: 1. If possible, presentations should be emailed/given to Prof. Gabriel for archival purposes on the course webpage. Thus, PowerPoint of pdf v
Maryland - ENCE - 203
ENCE 203 Computational Methods in Civil Engineering II Spring 2002 Professor GabrielHomework #6 Assigned: Monday March 4, 2002 Due at start of class: Monday March 11, 2002 If MATLAB is used , show printout of session. If Excel is used show formulas
Texas A&M - CHEM - 462
Prerequisites for Section VI (3 weeks) Metal Chemistry; coordination complexes, clusters, and solids (3 weeks) a. Alkali and alkaline earth metals b. d-block metals coordination complexes: ligands and geometries, isomerism, ligand field theory, magn
Columbia - P - 8442
Epidemiology of tuberculosis among the foreign-born in the United StatesMailman School of Public Health April 7, 2004Amy Davidow, Ph.D. Asst. Professor of Preventive Medicine &amp; Community Health Member, NJMS National Tuberculosis Center New Jersey M
Columbia - P - 9740
Columbia - P - 6300
Columbia - P - 6300
Columbia - P - 6300
Columbia - P - 6300
Columbia - P - 6300
Columbia - P - 6300
Texas A&M - PHYS - 314
Lecture 718 September 2007pp-cycle in the sunDavis ExperimentDavis ExperimentOnly found 1/3 of the expected neutrinos. No one believed him! We now know that e oscillates into and The Death of StarsWhite dwarfNeutron starDeath of Sta
Columbia - M - 8120
Abstracting the Evidence to Design Informatics Tools that Support Evidence- and Patient Preference- based PracticePatient-focused Informatics ApplicationsSpecifcally:Cornelia M. Ruland, RN, Ph.D Visiting Assistant Professor Department of Medical
Columbia - JD - 2481
Learning About Our Users and Our Documents in the Digital LibraryDeveloping the Interface for the Herbert H. Lehman Special Correspondence Files at Columbia University LibrariesJoanna DiPasquale Geneseo, NY September 26, 2008Disclaimers and Notes
Michigan State University - CSE - 891
11 AUTOMATIC GAIT RECOGNITIONM.S. Nixon, J.N. Carter, D. Cunado, P.S. Huang, S.V. Stevenage University of Southampton Southampton, UK {msn,jnc,dc95r,psh95r}@ecs.soton.ac.uk {S.V.Stevenage}@soton.ac.ukrecognise people by the way they walk. Gaits a
Michigan State University - CSE - 891
Biometric System SecurityAnil K. JainMichigan State University jain@cse.msu.edu http:/biometrics.cse.msu.edu1Outline Introduction Biometric System Architecture Attacks against Biometric Systems Taxonomy of Attacks Attack Examples Solution
Michigan State University - CSE - 891
17 TECHNICALOF BIOMETRIC TESTING AND EVALUATIONIDENTIFICATION DEVICESJames L. Wayman National Biometric Test Center San Jose State University San Jose, CA biomet@email.sjsu.eduAbstract Although the technical evaluation of biometric identification
Michigan State University - CSE - 891
ContentsForeword Preface 1. 2. 3. 4. 5. 6. 7. 8. 9. Jain, R. Bolle, and S. Pankanti: Introduction to biometrics L. OGorman: Fingerprint verification J. Weng and D. L. Swets: Face recognition R. Zunkel: Hand geometry based verification J. Daugman: Re
Texas A&M - WFSC - 302
WFSC 302 Lab ProtochordatesKingdom Animalia Phylum Hemichordata Class Enteropneusta Balanoglossus sp. Phylum Chordata Subphylum Urochordata Class Ascidiacea Ciona sp. Molgula sp. Subphylum Cephalochordata Branchiostoma sp. Craniata Subphylum Hypero
Texas A&M - WFSC - 302
WFSC 302 NATURAL HISTORY OF THE VERTEBRATES LECTURE NOTESWFSC 302: Natural History of the Vertebrates Course Theme: Adaptive radiation of the vertebrates. Vertebrate natural history refers to the study of various aspects of the biology of vertebrat
Texas A&M - WFSC - 302
WFSC 302 Lab - Alternate Fish ListKingdom Phylum Subphylum Superclass Class Subclass Animalia Chordata Hyperotreti Vertebrata Hyperoartia Cephalaspidomorphi Gnathostomata Chondrichthyes Holocephali Elasmobranchii Order Myxiniformes Petromyzontiforme
Columbia - RSO - 2102
Eurographics Symposium on Rendering (2006) Tomas Akenine-Mller and Wolfgang Heidrich (Editors)Exploiting Temporal Coherence for Incremental All-Frequency RelightingRyan Overbeck, Aner Ben-Artzi, Ravi Ramamoorthi and Eitan GrinspunColumbia Univers
Texas A&M - WFSC - 604
Systems Analysis &amp; Simulation in Ecology &amp; NRM (WFSC 604)Fall 20074 October 2007Dr. William H. Neill Professor, WFSCWFSC 604 W.H. Neill, TAMU, 2007Today's Agenda Preliminary project reports from Todd Dart Chris Chapa Julie Groce Kelly W
Texas A&M - STAT - 651
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|15 Jan 2002 13:58:25 -0000 vti_extenderversion:SR|5.0.2.2623 vti_author:SR|MS1\mspeed vti_modifiedby:SR|MS1\mspeed vti_timecreated:TR|15 Jan 2002 13:58:25 -0000 vti_cacheddtm:TX|15 Jan 2002 13:58:25 -00
Texas A&M - STAT - 651
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|15 Jan 2002 13:58:25 -0000 vti_extenderversion:SR|5.0.2.2623 vti_author:SR|MS1\mspeed vti_modifiedby:SR|MS1\mspeed vti_timecreated:TR|15 Jan 2002 13:58:25 -0000 vti_cacheddtm:TX|15 Jan 2002 13:58:25 -00
Idaho - CS - 438
CS438/538Intrusion Detection Systems1IDS Introduction How does an IDS work? Why do y need an IDS? y you If you have to monitor something valuable . what do you do? Post sentries outside, put up surveillance cameras That's the idea of an IDS
Idaho - CS - 336
Introduction to Information Assurance: Lecture 9Jie ZhouCopyright 2005 Jim Alves-Foss, All rights reserved1What is Malicious Code?DefinitionGeneral name for unanticipated or undesired effects in programs or program parts, caused by an agent