Worked Sample Problems - Math 103
Problem 1 Find all that satisfy .
Maple can solve many inequalities, such as the one in this problem:
> | solve(5*x-3<=7-3*x); |
This indicates that the solution is . Note what happens when the inequality is strict: .
> | solve(5*x-3<7-3*x); |
Of course, this indicates that the solution is .
Problem 2 Solve .
> | solve(abs(z/5-1)<=1); |
Problem 3 Solve
> | solve(abs(x-1)=1-x); |
Problems 4 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])); |
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]); |
> | linethrough([-8,0],[-1,3]); |
Problem 5 Here is a plot of and C=F:
> | plot({5/9*(F-32),F},F=-50..50,color=blue,thickness=2,labels=["F","C"]); |
To find where the lines cross, we solve:
> | solve(F=5/9*(F-32),F); |
Problem 6 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; |
> | simplify(g(x)+g(-x)); |
> | simplify(g(x)-g(-x)); |
Since g(x)-g(-x) is zero, the function g is even.
Problem 7 If , , and , compute , , and .
> | u:=x->4*x-5; v:=x->x^2; f:=x->1/x; |
> | v(f(u(x))); |
> | f(u(v(x))); |
> | f(v(u(x))); |
Problem 8 Plot , , and for , restricting the verticle axis to .
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); |
Problem 9 Plot the circle .
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); |
To find intercepts:
> | solve(subs(y=0,circ),x); |
So x-intercepts are [2,0] and [-2,0].
> | solve(subs(x=0,circ),y); |
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]; |
Problem 10 Let . Plot and , , for .
First we define f(x):
> | f:=x->5*x/(x^2+4); |
> | 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}); |
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}); |
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}); |
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).
Problem 11 Plot for .
Again, plotting is easy -- just make sure to make the domain big enough to include a few periods (the period of this function is , of course.
> | plot(sin(x+Pi/2),x=-4*Pi..4*Pi,color=blue,thickness=2); |
Problem 12
Maple doesn't mind trig functions, so to get it to evaluate you have to tell it to convert it to "radical" form:
> | convert((sin(Pi/8))^2,radical); |