For more information on denite integration in maple

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x + 2 x2 − 2 x + 1 x→1 x4 + 3 x3 − 7 x2 + x + 2 lim > value(%); 1 8 Taking the limit of an expression from either the positive or the negative direction is also possible. For example, consider the limit of tan(x) as x approaches π/2. Calculate the left-hand limit by using the option left. > Limit(tan(x), x=Pi/2, left); 66 • Chapter 3: Finding Solutions x→(1/2 π )− lim tan(x) > value(%); ∞ Calculate the right-hand limit. > Limit(tan(x), x=Pi/2, right); x→(1/2 π )+ lim tan(x) > value(%); −∞ Using the series Command To create a series approximation of a function, note the following example. > f := x -> sin(4*x)*cos(x); f := x → sin(4 x) cos(x) > fs1 := series(f(x), x=0); fs1 := 4 x − 38 3 421 5 x+ x + O(x6 ) 3 30 By default, the series command generates an order 6 polynomial. By changing the value of the special variable, Order, you can increase or decrease the order of a polynomial series. Using convert(fs1, polynom) removes the order term from the series so that Maple can plot it. > p := convert(fs1,polynom); p := 4 x − 38 3 421 5 x+ x 3 30 3.5 Calculus > plot({f(x), p},x=-1..1, -2..2); 2 1 • 67 –1 –0.8–0.6–0.4–0.20 –1 –2 0.2 0.4 0.6 0.8 1 x If you increase the order of truncation of the series to 12 and try again, you see the expected improvement in the accuracy of the approximation. > Order := 12; Order := 12 > fs1 := series(f(x), x=0); fs1 := 4 x − 38 3 421 5 10039 7 246601 9 x+ x− x+ x− 3 30 1260 90720 6125659 11 x + O(x12 ) 9979200 > p := convert(fs1,polynom); p := 4 x − 38 3 421 5 10039 7 246601 9 x+ x− x+ x 3 30 1260 90720 6125659 11 − x 9979200 > plot({f(x), p}, x=-1..1, -2..2); 68 • Chapter 3: Finding Solutions 2 1 –1 –0.8–0.6–0.4–0.20 –1 –2 0.2 0.4 0.6 0.8 1 x Computing Derivatives and Integrals Maple can symbolically compute derivatives and integrals. For example, differentiate an expression, calculate the indefinite integral of its result, and compare it with the original expression. For more information on definite integration in Maple, see the next example. > f := x -> x*sin(a*x) + b*x^2; f := x → x sin(a x) + b x2 > Diff(f(x),x); ∂ (x sin(a x) + b x2 ) ∂x > df := value(%); df := sin(a x) + x cos(a x) a + 2 b x > Int(df, x); sin(a x) + x cos(a x) a + 2 b x dx > value(%); − cos(a x) cos(a x) + a x sin(a x) + + b x2 a a 3.5 Calculus > simplify(%); • 69 x (sin(a x) + b x) Diff and Int are the inert forms of the diff and int commands. The inert form of a command returns a typeset form of the operation instead of performing the operation. In the previous examples, the inert forms of the commands have been used in conjunction with the value command. Note that it is unnecessary to use the inert forms; derivatives and integrals can be calculated in single commands by using diff and int, respectively. For more information on these commands, refer to the ?diff and ?int help pages. You can also perform definit...
View Full Document

Ask a homework question - tutors are online