Worked Sample Problems - Math 103

CHAPTER P - Preliminaries

Section P.1, page 7

Problem 7

Maple can solve many inequalities, such as the one in this problem:

>   solve(5*x-3<=7-3*x);

RealRange(-infinity,5/4)

This indicates that the solution is x <= 5/4. Note what happens when the inequality is strict:

>   solve(5*x-3<7-3*x);

RealRange(-infinity,Open(5/4))

Of course, this indicates that the solution is x < 5/4.

Problem 25

>   solve(abs(z/5-1)<=1);

RealRange(0,10)

Problem 44

>   solve(abs(x-1)=1-x);

RealRange(-infinity,1)

Section P.2, page 15

Problems 19-20

We can write a little Maple program that finds the line through two points as follows:

>   linethrough:=(p,q)->y=simplify(q[2]+(q[2]-p[2])/(q[1]-p[1])*(x-q[1]));

linethrough := proc (p, q) options operator, arrow; y = simplify(q[2]+(q[2]-p[2])/(q[1]-p[1])*(x-q[1])) end proc

In Maple, points are indicated with square brackets, so problem 19 is to find the line through the points [3,4] and [-2,5]:

>   linethrough([3,4],[-2,5]);

y = 23/5-1/5*x

>   linethrough([-8,0],[-1,3]);

y = 24/7+3/7*x

Problem 45

Here is a plot of C = 5/9*(F-32) and C=F:

>   plot({5/9*(F-32),F},F=-50..50,color=blue,thickness=2,labels=["F","C"]);

[Maple Plot]

To find where the lines cross, we solve:

>   solve(F=5/9*(F-32),F);

-40

Section P.3, page 25

Problem 32

To see whether a function is even or odd, we can add and subtract f(x) and f(-x) as follows:

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

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

>   simplify(g(x)+g(-x));

2*x^4+6*x^2-2

>   simplify(g(x)-g(-x));

0

Since g(x)-g(-x) is zero, the function g is even.

Problem 45 d-f

>   u:=x->4*x-5; v:=x->x^2; f:=x->1/x;

u := proc (x) options operator, arrow; 4*x-5 end proc

v := proc (x) options operator, arrow; x^2 end proc

f := proc (x) options operator, arrow; 1/x end proc

>   v(f(u(x)));

1/((4*x-5)^2)

>   f(u(v(x)));

1/(4*x^2-5)

>   f(v(u(x)));

1/((4*x-5)^2)

Section P.4, page 32

Problems 17, 19, 28

Of course, Maple makes these easy - here are all the answers on one graph:

>   plot({sqrt(x+4),abs(x-2),(x+2)^(3/2)+1},x=-5..5,-1..10,color=blue,thickness=2);

[Maple Plot]

Problem 47

Wc can plot the circle using "implicitplot" -- be sure and use "scaling=constrained" so you don't get an ellipse:

>   circ:=x^2+y^2-3*y-4=0:

>   with(plots,implicitplot):

>   implicitplot(circ,x=-3..3,y=-1..4,thickness=2,color=blue);

[Maple Plot]

To find intercepts:

>   solve(subs(y=0,circ),x);

2, -2

So x-intercepts are [2,0] and [-2,0].

>   solve(subs(x=0,circ),y);

4, -1

and y-intercepts are [0,4] and [0,-1].

The x and y coordinates of the center must be at the averages of the x and y intercepts. (Why?) - So:

>   center:=[(2-2)/2,(4-1)/2];

center := [0, 3/2]

Problem 83

First we define f(x):

>   f:=x->5*x/(x^2+4);

f := proc (x) options operator, arrow; 5*x/(x^2+4) end proc

>   with(plots,display):

>   A:=plot(f(x),x=-10..10,color=blue,thickness=4):

We made a thick copy of the graph of f to compare with the others we will make:

(a) We'll also plot f(ax) for a=2,3,10 and display them all together:

>   B:=plot({f(2*x),f(3*x),f(10*x)},x=-10..10,color=red,thickness=2):

>   display({A,B});

[Maple Plot]

Apparently the bend in the middle of the graph gets sharper and bunches in toward the y-axis as a gets larger.

(b) Now we'll plot f(ax) for a=-2,-3 against the original f:

>   C:=plot({f(-2*x),f(-3*x)},x=-10..10,color=red,thickness=2):

>   display({A,C});

[Maple Plot]

So the graph gets flipped (around either of the x or y axes), and bunches in as a gets more negative.

(c) Now for a=1/2, 1/3 and 1/4:

>   E:=plot({f(x/2),f(x/3),f(x/4)},x=-10..10,color=red,thickness=2):

>   display({A,E});

[Maple Plot]

Now it appears that the graphs are getting "wider" - the bumps in the graph move away from the y axis (if we used small negative values of a, the graph would flip as well).

Section P.5, page 43

Problem 20

Again, plotting is easy -- just make sure to make the domain big enough to include a few periods (the period of this function is 2*Pi, of course.

>   plot(sin(x+Pi/2),x=-4*Pi..4*Pi,color=blue,thickness=2);

[Maple Plot]

Problem 50

Maple doesn't mind trig functions, so to get it to evaluate sin(Pi/8) you have to tell it to convert it to "radical" form:

>   convert((sin(Pi/8))^2,radical);

1/2-1/4*2^(1/2)