Using Maple to check your homework answers.

advertisement
Using Maple to check your homework answers.
Warning: I expect you to fully work through homework problems by hand, and to show the various
steps/details. It is not okay to simply plug the problem into M aple and write down the answer it spits
out. Turing in such answers on a quiz is considered cheating, and will result in a minimum penalty of a
score of 0 on that quiz. On any homework or test problem, I would want to see any initial steps
(rewriting, any algebra you decide to do beforehand, etc), the unsimplified/'raw' result from whatever
differentiation rules you use, and then whatever simplifications you need or decide to do.
Problem 3.2.9 in the book asks you to differentiate F(y)=
1
3
K
y C 5 y3 = yK2 K 3 yK4 y C 5 y3 . If we differentiate this as is (without doing any
2
4
y
y
other sort of algebra beyond rewriting all the y's as y^(some power), then we would get
2
12
F' y = K2 yK3 C 12 yK5 y C 5 y3 C yK2 K 3 yK4 1 C 15 y2 = K 3 C 5
y C 5 y3
y
y
1
3
C
K 4
1 C 15 y2
2
y
y
(and on a test or on a homework quiz, I would accept either of these as your final answer). Now in this
case, this is exactly what M aple gives us if we ask it to differentiate the function:
O diff((y^(-2)-3*y^(-4))*(y+5*y^3), y);
2
12
1
3
K 3 C 5
y C 5 y3 C
K 4
1 C 15 y 2
(1)
2
y
y
y
y
14
9
But the back of the book says that the answer isF' y = 5 C 2 C 4 . So how can you check your
y
y
answer when doing the homework?
In some cases, the algebra needed to make an answer match the back of the book isn't going take too
long. In this case, the algebra is a little more involved (we'd have to multiply our answer out, cancel
some factors, and combine terms in order to get them to match).
One option is to use M aple to differentiate the function and see if it matches your answer. If your
answer is different from both the M aple answer and the back of the book (and you can't see how to get
either), then there are some other tools you can use in M aple. The main one is the simplify() command.
If we use it on our answer, it gives
O simplify((-2/y^3+12/y^5)*(y+5*y^3)+(1/y^2-3/y^4)*(1+15*y^2));
14 y 2 C 5 y 4 C 9
(2)
y4
This still isn't quite what the back of the book has (although it's more obvious now that they are the
same). So, another option is to use the simplify command on either (your answer)-(back of book) or
(back of book)-(your answer). If the two are the same, then the difference should simplify down to 0:
O simplify( ( (-2/y^3+12/y^5)*(y+5*y^3) + (1/y^2-3/y^4)*(1+15*y^2)
) - ( 5 + 14/y^2 + 9/y^4 ) );
0
(3)
(Note: be sure you have parenthesis around the entire function you're subtracting, otherwise you'll reach
a wrong conclusion)
So, this tells us that our answer does indeed match the back of the book.
Download