Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132928 views
License: OTHER

Graphing Functions and Solving Equations in Sage Assignment

Question 0

Watch the lecture video here.

Did you watch the video? [Type yes or no.]

Question 1

Consider the function F(x)=x3+x2+xx2−x−2\displaystyle F(x) =\frac{x^3 + x^2 + x}{x^2 - x -2 }.

[Don't forget parentheses around the numerator and denominator.]

Part a

Graph this function in Sage with −5≤x≤5-5\le x \le 5. Your graph should not be very nice. The problem is the vertical asymptotes.

Part b

Produce a new graph with −5≤x≤5-5\le x\le 5 and add ymin=−20\text{ymin}=-20 and ymax=20\text{ymax}=20. You should see a much nicer graph. Remember, the vertical lines at x=−1x=-1 and x=2x=2 are not actually part of the graph of the function.

Question 2

Consider the function h(x)=0.01x3−x2+5h(x)=0.01x^3-x^2+5.

[Make sure you type hh correctly, especially the 0.01 at the front]

Part a

Graph this function using the default window. Notice that no roots (zeros, x-intercepts) are visible. We know from precalc that a cubic polynomial has at least one and at most three roots.

Part b

Create a new plot of hh with −10≤x≤10-10\le x \le 10. You should see two roots.

Part c

If you remember end behavior of polynomials, then you know that the y-values should go up as the x-values get bigger. On the previous graph, the y-values are heading down. That means this curve needs to turn around eventually, and when it does it will have to cross the x-axis again. Now try to graph again with −10≤x≤100-10\le x\le 100. This time, you should see the third root (but the first two may be hard to see now).

Question 3

Graph f(x)=x3f(x)=x^3 and g(x)=−2(x+1)3+4g(x)=-2(x+1)^3+4 on the same axes with −5≤x≤5-5\le x \le 5 and −10≤y≤10-10 \le y \le 10.

Use two different colors and two different line styles.

Question 4

Use the solve command to solve for xx: x3−4x2+x+6=0\quad x^3 - 4x^2 + x + 6=0

Question 5

Use the solve command to solve for mm: mm+a+1m2+b=1\quad\displaystyle \frac{m}{m+a}+\frac{1}{m^2+b}=1

[Don't forget parentheses around the denominators, and declare variables.]

Question 6

Consider the equation xx=7x^x=7.

Part a

Plot this equation with 0<x<30 < x < 3 (remember to use two equal signs when typing the equation).

[Your graph should have only one curve.]

Part b

Adjust the plot window (zoom in) to approximate to two decimal places the x-intercept of the graph (this is the solution of the equation).

Part c

Use find_root to solve for xx.

Question 7

Part a

Graph both sides of the equation ex=x3e^x=x^3 and adjust the window until you can clearly see two points of intersection.

[Your graph should have two curves.]

Note: e is not a variable, it is a constant (e≈2.718e\approx 2.718). Never declare e.

Part b

Solve this equation for xx using find_root (remember, there are two real solutions).

Question 8

Solve the inequality x3−3x>4x2+2x^3-3x > 4x^2+2 using the solve command.

This material was developed by Aaron Tresham at the University of Hawaii at Hilo and is Creative Commons License
licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.