Michael Thomason's write-up for assignment one, problem 2.

I begin by defining two functions, f and g, in terms of x. Also shown are their graphs.

> f:=x->2*x+1;
g:=x->-3*x+2;

plot([f(x),g(x)],x=-5..5,y=-5..5,color=[red,blue],scaling=constrained);

f := proc (x) options operator, arrow; 2*x+1 end proc

g := proc (x) options operator, arrow; -3*x+2 end proc

[Plot]

I will now explore what happens when the four basic arithmetic operations are performed between f and g. First, I will explore addition.

> plot(f(x)+g(x),x=-5..5,y=-5..5,scaling=constrained);

[Plot]

The graph of f + g is a new linear function. Here is a step by step evaluation of f + g.
f(x)+g(x) = 2*x+1+(-3*x+2)

f(x)+g(x) = 2*x-3*x+1+2 f(x)+g(x) = -x+3

f(x)+g(x) = -x+3

The above graph is indeed that of -x + 3.

Now for f - g.

> plot(f(x)-(g(x)),x=-5..5);

[Plot]

Here is an evaluation of f - g.

f(x)-g(x) = 2*x+1-(-3*x+2)

f(x)-g(x) = 2*x+1+3*x-2

f(x)-g(x) = 2*x+3*x+1-2

f(x)-g(x) = 5*x-1

The above graph is indeed that of 5x - 1.

Now for f * g. I will begin with the evaluation rather than the graph so that the graph will be less of a surprise. (Note that "%" is a shortcut for "last output" and is used similarly to the "Ans" button on TI calculators.)

> f(x)*g(x);

(2*x+1)*(-3*x+2)

> expand(%);

-6*x^2+x+2

So, the product of the two linear functions I have chosen is a quadradic function. Is this always the case? Consider the general form for a linear fucntion, f(x) = a*x+b , where a and b are constants. Computing the product of two such functions gives (a*x+b)*(c*x+d) = a*c*x^2+a*d*x+b*c*x+b*d . Since a, b, c, and d are all constants, so too are ac, ad, bc, and bd. Re-writing with new constants j, k, and l, we have the general formula for a quadratic funtion, q(x) = j*x^2+k*x+l . Plotting f * g will show a downward-opening parabola because the product is a quadratic expression with a negative leading coefficient.

> plot(f(x)*g(x),x=-5..5);

[Plot]

Finally, what happens when we compute and graph the quotient f(x)/g(x) ? I will begin by graphing.

> plot(f(x)/g(x),x=-5..5,y=-10..10);

[Plot]

The above graph is a hyperbola. Here is why a vertical asymptote is expected:

> f(x)/g(x);

(2*x+1)/(-3*x+2)

A vertical asymptote occurs when substituting a certain value of x calls for dividing by zero, which is not defined. Finding where the denominator of the above expression equals zero will show for which x value the above graph has a vertical asymptote.

> solve(g(x)=0,x);

2/3

The vertical asymptote occurs when x = 2/3 . The limit from the left is positive infinity because the positive numerator is being divided by positive numbers less than one, which approach zero. This is the same as multiplying by the reciprocals of positive numbers less than one, ie this is the same as multiplying the numerator by very large positive numbers. The limit from the right is negative infinity because the positive numerator is being multiplied by very large negative numbers as x goes to 2/3 from the right.

> limit(f(x)/g(x),x=2/3,left);

infinity

> limit(f(x)/g(x),x=2/3,right);

-infinity


Return to my main page.