7 7 |
17/3 17/3 |
20/21 20/21 |
sqrt(2) + 1 sqrt(2) + 1 |
2.41421356237309 2.41421356237309 |
2.41421356237309 2.41421356237309 |
2.4142135623730950488 2.4142135623730950488 |
pi pi |
3.14159265358979 3.14159265358979 |
|
|
3 3 |
|
|
8 8 |
1/2 1/2 |
x |--> x^2 x |--> x^2 |
25 25 |
(h + x)^2 h^2 + 2*h*x + x^2 (h + x)^2 h^2 + 2*h*x + x^2 |
x |--> 1/2*x + 1 x |--> 1/2*x + 1 |
x |--> a*x + 1 x |--> a*x + 1 |
2 2 |
pi^2 pi^2 |
|
|
0 1/2*sqrt(3) 1/2*sqrt(2) 1/2 0 1/2*sqrt(3) 1/2*sqrt(2) 1/2 |
sin(1) + 1 4*sin(2) sin(x)^2 sin(x^2) sin(1) + 1 4*sin(2) sin(x)^2 sin(x^2) |
| function | Sage notation |
| \sqrt{x} | sqrt(x) |
| e^x | exp(x) |
| \ln{x} | ln(x) or log(x) |
| \log_n(x) (base n logarithm) | log(x,n) |
| sin(x) | sin(x) |
| cos(x) | cos(x) |
| tangent | tan(x) |
|
|
|
|
|
|
|
|
|
|
x |--> 4*x^3 x |--> 4*x^3 |
81 108 81 108 |
x |--> 0 x |--> 0 |
x |--> 2*cos(x) 0 x |--> 2*cos(x) 0 |
x |--> 12*x^2 x |--> 12*x^2 |
x |--> 24*x x |--> 24*x |
(log(x) + 1)*x^x (log(x) + 1)*x^x |
4 4 |
2 2 |
1 1 |
1/2 1/2 |
0 0 |
+Infinity +Infinity |
-Infinity -Infinity |
[x == -2, x == -1] [x == -2, x == -1] |
[x == -1/2*b - 1/2*sqrt(b^2 - 4*c), x == -1/2*b + 1/2*sqrt(b^2 - 4*c)] [x == -1/2*b - 1/2*sqrt(b^2 - 4*c), x == -1/2*b + 1/2*sqrt(b^2 - 4*c)] |
[[x == 5, y == 1]] [[x == 5, y == 1]] |
0.78539816339744839 0.78539816339744839 |
See the Applied Project: Where to Sit at the Movies below for another example of where we use the find_root command.
|
|
0.870073695796209 0.870073695796209 |
0.871221414262919 0.871221414262919 |
0.871221514495088 0.871221514495088 |
[1, 0.870073695796209, 0.871221414262919, 0.871221514495088, 0.871221514495089, 0.871221514495089] [1, 0.870073695796209, 0.871221414262919, 0.871221514495088, 0.871221514495089, 0.871221514495089] |
1/5*x^5 1/5*x^5 |
242/5 242/5 |
x*sin(x) + cos(x) x*sin(x) + cos(x) |
integrate(sin(x)/x, x, 1, 1/2*pi) integrate(sin(x)/x, x, 1, 1/2*pi) |
0.42467909778730545 0.42467909778730545 |
0.42467909778730545 0.42467909778730545 |
Click to the left again to hide and once more to show the dynamic interactive window |
Right-endpoint, Left-enpoint, Midpoint, and Trapezoid.
Click to the left again to hide and once more to show the dynamic interactive window |
Simpson's Rule:
|
|
(0.693253968253968, 0.693147180559945) (0.693253968253968, 0.693147180559945) |
[1, 2, 3] [1, 2, 3] |
12.0901461298634 12.0901461298634 |
7.48547086055035 7.48646986154935 7.48746786554136 7.48846487451444 7.48946089045070 7.49045591532632 7.48547086055035 7.48646986154935 7.48746786554136 7.48846487451444 7.48946089045070 7.49045591532632 |
|
|
|
|
This example is taken from the Applied Project: Where to Sit at the Movies on page 446 of James Stewart's Calculus textbook (6th Ed.).
x |--> arccos(1/2*(2*(x*cos(1/9*pi) + 9)^2 + (x*sin(1/9*pi) - 31)^2 + (x*sin(1/9*pi) - 6)^2 - 625)/sqrt(((x*cos(1/9*pi) + 9)^2 + (x*sin(1/9*pi) - 6)^2)*((x*cos(1/9*pi) + 9)^2 + (x*sin(1/9*pi) - 31)^2))) x |--> arccos(1/2*(2*(x*cos(1/9*pi) + 9)^2 + (x*sin(1/9*pi) - 31)^2 + (x*sin(1/9*pi) - 6)^2 - 625)/sqrt(((x*cos(1/9*pi) + 9)^2 + (x*sin(1/9*pi) - 6)^2)*((x*cos(1/9*pi) + 9)^2 + (x*sin(1/9*pi) - 31)^2))) |
|
|
It looks like the maximum occurs somewhere slightly less than 10, say around 8 or 8.5.
We can now find this maximum by determining where the derivative is 0: \theta^{\prime}(x) = 0.
[x == -9/cos(1/9*pi), x == -(9*sin(1/9*pi)^2 + 9*cos(1/9*pi)^2 + sqrt(27*sin(1/9*pi)^4 + 111*sin(1/9*pi)^3*cos(1/9*pi) + 89*sin(1/9*pi)^2*cos(1/9*pi)^2 + 111*sin(1/9*pi)*cos(1/9*pi)^3 + 62*cos(1/9*pi)^4)*sqrt(3))/(sin(1/9*pi)^2*cos(1/9*pi) + cos(1/9*pi)^3), x == -(9*sin(1/9*pi)^2 + 9*cos(1/9*pi)^2 - sqrt(27*sin(1/9*pi)^4 + 111*sin(1/9*pi)^3*cos(1/9*pi) + 89*sin(1/9*pi)^2*cos(1/9*pi)^2 + 111*sin(1/9*pi)*cos(1/9*pi)^3 + 62*cos(1/9*pi)^4)*sqrt(3))/(sin(1/9*pi)^2*cos(1/9*pi) + cos(1/9*pi)^3)] [x == -9/cos(1/9*pi), x == -(9*sin(1/9*pi)^2 + 9*cos(1/9*pi)^2 + sqrt(27*sin(1/9*pi)^4 + 111*sin(1/9*pi)^3*cos(1/9*pi) + 89*sin(1/9*pi)^2*cos(1/9*pi)^2 + 111*sin(1/9*pi)*cos(1/9*pi)^3 + 62*cos(1/9*pi)^4)*sqrt(3))/(sin(1/9*pi)^2*cos(1/9*pi) + cos(1/9*pi)^3), x == -(9*sin(1/9*pi)^2 + 9*cos(1/9*pi)^2 - sqrt(27*sin(1/9*pi)^4 + 111*sin(1/9*pi)^3*cos(1/9*pi) + 89*sin(1/9*pi)^2*cos(1/9*pi)^2 + 111*sin(1/9*pi)*cos(1/9*pi)^3 + 62*cos(1/9*pi)^4)*sqrt(3))/(sin(1/9*pi)^2*cos(1/9*pi) + cos(1/9*pi)^3)] |
Well, it looks like the solve command returned the exact solutions. This isn't too helpful here, since these look a little messy, so instead we compute the solutions numerically. This can be done using the find_root command. We can also specify the interval to look in: x in (0,60).
8.253062089733648 8.253062089733648 |
And there we have it!
|
|
|
|
|
|
|
|