Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Sums, Products, and Quotients of Functions

Views: 200
Kernel: SageMath (stable)

Algebra Revisited 2018

Modern Algebra: A Logical Approach, Book Two,

circa 1966 [Frank B Allen, Helen R. Pearson]

Chapter 6: Functions and Other Relations

Sums, Products, and Quotients of Functions

Example 1 p.317

If F=(x,y)∣y=−x2+2F = {(x,y)| y = -x^2 + 2} and G=(x,y)∣y=x+4G = {(x,y)| y = x + 4}, find F + G. Draw the graphs of F, G, and F + G

%display typeset x, y = var('x y') f(x) = -x^2 + 2 g(x) = x + 4 f(x) + g(x)

F + G = {(x,y) | y = −x2+x+6-x^2 + x + 6} ∧\land x ϵ\epsilon R\mathbb{R}}

table([(x,f(x), g(x), f(x) + g(x)) for x in [-3, -2, -sqrt(2), -1 , 0, 1, sqrt(2), 2, 3]], \ header_row=["$x$", "$f(x)$", "$ g(x)$", "$f(x) + g(x)$"])

You can create the transpose of this table by passing the original data as the columns of the table and using header_column instead of header_row:

table(columns=[(x,f(x), g(x), f(x) + g(x)) for x in [-3, -2, -sqrt(2), -1 , 0, 1, sqrt(2), 2, 3]], \ header_column=["$x$", "$f(x)$", "$g(x)$", "$f(x) + g(x)$"])
p = Graphics() p += plot(f, (x,-5,5)) p += plot(g, (x, -5, 5)) p += plot(f + g, (x, -5, 5)) p.show(xmin=-5, xmax=5, ymin=-10, ymax=10)
Image in a Jupyter notebook

Example 3: If F = {(x,y)| y = 2} and G = {(x,y)| y = x + 4}, find FG and draw graphs of F, G, and FG

f(x) = 2 g(x) = x + 4 f*g
f(x)*g(x)
table(columns=[(x,f(x), g(x), f(x) * g(x)) for x in [-3, -2, -1, 0, 1, 2, 3]], \ header_column=["$x$", "$f(x)$", "$g(x)$", "$f(x) * g(x)$"])
p = Graphics() p += plot(f, (x,-6,8), color='red',legend_label='f(x) = 2') p += plot(g, (x, -6, 8), color='green',legend_label='g(x) = x + 4') p += plot(f * g, (x, -6, 8), color='purple',legend_label='f(x) * g(x) = 2*x + 8') p.show(xmin=-6, xmax=8, ymin=-5, ymax=10)
Image in a Jupyter notebook

Example 4 p.318-319

If F = {(x,y)| y = 1} and G = {(x,y)| y = x^2 - 1}, find F/G and draw graphs of F, G, and F/G

f(x) = 1 g(x) = x^2 - 1 f/g
f(x)/g(x)
table(columns=[(x,f(x), g(x)) for x in \ [-3, -2, -3/2, -1, -3/4, -1/2, 0, 1/2, 3/4, 1, 3/2, 2, 3]], \ header_column=["$x$", "$f(x)$", "$g(x)$"])
table(columns=[(x,f(x), g(x), f(x) / g(x)) for x in \ [-3, -2, -3/2,-3/4, -1/2, 0, 1/2, 3/4, 3/2, 2, 3]], \ header_column=["$x$", "$f(x)$", "$g(x)$", "$f(x)/g(x)$"])
p = Graphics() p += plot(f, (x,-4,4), color='cyan',legend_label='f(x) = 1') p += plot(g, (x, -4, 4), color='green',legend_label='g(x) = x^2 - 1 ') p += plot(f/g, (x, -4, 4), color='purple',legend_label='f(x)/g(x) = 1/(x^2 - 1)') p.show(xmin=-4, xmax=4, ymin=-4, ymax=4)
Image in a Jupyter notebook

When x is an element of the interval (-1,1), g(x) < 0.

As x approaches 1 from the left in the interval [0, 1), x^2 - 1 becomes very small and hence abs(1 / (x^2 - 1)) increases without bound while [1 / (x^2 - 1)] < 0.

This explain why one branch of the curve plunges downward and seems to approach the line whose equation is x = 1.

When x is just a little greater than 1, g(x) > 0 and very small. Hence the quotient is positive and large. The graph of f(x)/g(x) is shown in purple.

Note that the vertical lines are not actually part of the graph!

limit(g(x), x=1)
limit(f(x)/g(x), x=1, dir='-')
limit(f(x)/g(x), x=1, dir='+')
limit(f(x)/g(x), x=-1, dir='-')
limit(f(x)/g(x), x=-1, dir='+')

p.320 (5)

f(x) = 2 g(x) = x - 1 p = plot(f, (x, -3, 3), color='orange') p += plot (g, (x, -10, 10)) p += plot(f + g, (x, -3, 3)) p.show()
Image in a Jupyter notebook

p.321 (6) Given F = {(x,y)| y = x^2} and G = {(x,y)| y = x + 4}, construct the graph of (a) F + G (b) F*G

f(x) = x^2 g(x) = x + 4 p = plot(f, (x, -10, 10), color='cyan',legend_label='f(x) = x^2') p += plot(g, (x, -10, 10), color='green',legend_label='g(x) = x + 4') p += plot(f+g, (x, -10, 10), color='blue', legend_label='f+g = x^2 + x + 4') p += plot(f*g, (x, -10, 10), color='red',legend_label='f*g = x^3 + 4*x^2') p.show(xmin=-5, xmax=5, ymin=-5, ymax=10)
Image in a Jupyter notebook

(7) If F = {(x,y)| y = 1} and G = {(x,y)| y = x}, construct the graph of F/G

f(x) = 1 g(x) = x p = plot(f, (x, -10, 10), color='cyan',legend_label='f(x) = 1') p += plot(g, (x, -10, 10), color='green',legend_label='g(x) = x') p += plot(f/g, (x, -10, 10), color='red',legend_label='f/g = 1/x') p.show(xmin=-5, xmax=5, ymin=-5, ymax=10)
Image in a Jupyter notebook

(8) Given F = {(x,y)| y = x^2} and G = {(x,y)| y = -x^2 + 3}, construct the graph of (a) F*G (b) F/G

f(x) = x^2 g(x) = -x^2 + 3 p = plot(f, (x, -10, 10), color='cyan',legend_label='$f(x) = x^2$') p += plot(g, (x, -10, 10), color='green',legend_label='$g(x) = -x^2 + 3$') p += plot(f*g, (x, -10, 10), color='blue', legend_label='$f*g = -x^4 + 3*x^2$') p += plot(f/g, (x, -10, 10), color='red',legend_label='$f/g = (x^2/(-x^2+3)$)') p.show(xmin=-5, xmax=5, ymin=-5, ymax=5)
Image in a Jupyter notebook
limit(f/g, x=sqrt(3), dir='+')
limit(f/g, x=sqrt(3), dir='-')
limit(f/g, x=-sqrt(3), dir='+')
limit(f/g, x=-sqrt(3), dir='-')
limit(f/g, x=oo)
limit(f/g, x=-oo)
table(columns=[(x,f(x), g(x), f(x)*g(x), f(x) / g(x)) for x in \ [-3, -2, -1, 0, 1, 2, 3]], \ header_column=["$x$", "$f(x)$", "$g(x)$", "$f(x)*g(x)$", "$f(x)/g(x)$"])

(9) If f(x)=x+3f(x) = x + 3 and g(x)=x2−4g(x) = x^2 - 4 are the defining equations of F and G, respectively, construct the graph of F/G.

f(x) = x + 3 g(x) = x^2 - 4 f(x)/g(x)
factor(f(x)/g(x))
table(columns=[(x,f(x), g(x), f(x) / g(x)) for x in \ [-5, -4, -3, -1, 0, 1, 3, 4, 5]], \ header_column=["$x$", "$f(x)$", "$g(x)$", "$f(x)/g(x)$"])
p = plot(f, (x, -10, 10), color='cyan',legend_label='$f(x) = x + 3$') p += plot(g, (x, -10, 10), color='green',legend_label='g(x) = $x^2 - 4$') p += plot(f/g, (x, -10, 10), color='red',legend_label='$f(x)/g(x) = (x+3)/((x+2)*(x-2))$') p.show(xmin=-5, xmax=5, ymin=-5, ymax=10)
Image in a Jupyter notebook
x = var('x') limit(f(x)/g(x), x=-oo)
limit(f(x)/g(x), x=oo)
limit(f(x)/g(x), x=-2, dir='-')
limit(f(x)/g(x), x=-2, dir='+')
limit(f(x)/g(x), x=2, dir='+')
limit(f(x)/g(x), x=2, dir='-')