Assignment #6



Question #1:

Give a summary of what the following commands are doing when you enter them in Maple and explain what the response that Maple returns tell you. Carefully note anything strange in the responses that you receive.

> solve(y=a*x+b, x);
> solve(a*x+b, x);
> solve([y=a*x+b,y=c*x+d],[x,y]);
> f:=x->a*x+b;
> g:=x->c*x+d;
> f((d-b)/(a-c));
> simplify(f((d-b)/(a-c)));
> g((d-b)/(a-c));
> simplify(g((d-b)/(a-c)));
> evalb(f((d-b)/(a-c))=g((d-b)/(a-c)));
> f((d-b)/(a-c))-g((d-b)/(a-c));
> simplify(f((d-b)/(a-c))=g((d-b)/(a-c)));


Question #2:

Give a summary of what the following commands are doing when you enter them in Maple and explain what the response that Maple returns tell you.

> plot([3*x+1,x^2-2*x],x=-10..10);
> solve([y=3*x+1,y=x^2-2*x]);
> subs(solve([y=3*x+1,y=x^2-2*x]),x);
> subs(solve([y=3*x+1,y=x^2-2*x]),y);
> allvalues(subs(solve([y=3*x+1,y=x^2-2*x]),x));
> allvalues(subs(solve([y=3*x+1,y=x^2-2*x]),y));


Question #3:
Let $z$ and $y$ be variables, let $y = \frac{a+bz}{c+dz}$. Use the function solve in Maple to solve for $z$ in terms of $y$, that is, find a function $z = f(y)$. Let $g(z) = \frac{a+bz}{c+dz}$. Compute $g(f(y))$ and $f(g(z))$ and simplify the expressions. There are two ways to complete this task:
You might want to use the command subs to substitute an expression for a variable in an expression (e.g. subs(var=expr1, expr2) is the command to substitute expr1 into the variable var in expr2).
Alternatively you might want to define the functions $g(z)$ and $f(y)$ as real functions. For this you can use the Maple shorthand for functions g:=z->(a+b*z)/(c+d*z). To be careful here, Maple can "solve" expressions, but it cannot "solve" functions.

Question #4:
Let $z$ and $y$ be variables, let $y = \frac{a+bz+cz^2}{d+ez+fz^2}$. Use the function solve in Maple to solve for $z$ in terms of $y$, that is, find a function $z = f(y)$ (in fact, you should be able to find two). Let $g(z) = \frac{a+bz+cz^2}{d+ez+fz^2}$ and compute $g(f(y))$ for both of these functions and show that if you simplify the expressions you get a predictable answer. Next compute $f(g(z))$. What do you get? Explain why. Is there a function $f(y)$ such that $f(g(z))$ is equal to $z$?




You should open up a new worksheet and start from scratch. You will have to save your work in a file and upload that file on to the course moodle. Your solution should be a sequence of commands where it is easy to change the input string and after you execute the sequence of commands you should have the correct output string. Please add documentation to your worksheet to explain how it works. Just a few sentences is sufficient, but imagine that you were opening up the worksheet for the first time and wanted to know what it did. You will be marked down if what you write is not clear and coherent.

You should finish your assignment before class Tuesday October 23 by 11:59pm. Assignments submitted after this date will be assessed a penalty of 10% per day.