
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

MAT 305 FALL 2009
Due date: 13 Oct 2009
Lecture 4 described a method to compute an implicit derivative in Sage, and boiled it down to a mere 4 lines of work. It also noted that Sage lacks an explicit command to do this. Many other computer algebra systems have one; Maple, for example, has an implicit_diff() com- mand. For this assignment, you will adapt the method shown there as a new Sage function implicit_diff().
(1) Review the method outlined in Lecture 4. (2) Use the outline of the method to write pseudocode. Your pseudocode must follow the format described in Lecture 6. In particular, · emphasize structural keywords in boldface (algorithm, inputs, outputs, do, re- turn); · italicize the names of functions and mathematical objects ( f , x, y, etc.); · specify the set to which each input belongs. In addition, · Your pseudocode must accept at least one input, an equation in x and y. · The desired output is an expression in terms of x and y. I do not want an equation, such as y′^ = −x / y, but rather the expression −x / y. (3) Implement your pseuducode as a Sage function in a worksheet. You should follow your pseudocode closely, but you need not follow it exactly. It is probably helpful to look at how I implemented pseudocode in Lecture 6 (for example, tangent_line()); sometimes I added other inputs. (4) Test the Sage function using one or more non-trivial examples. (5) Share the worksheet with mat305_fa.
Some remarks and/or hints:
· The specified inputs of the pseudocode should match the inputs of the Sage function. You can add more inputs if you like, but you must at least do what your pseudocode asks. · The Sage functions’ output should not be an equation, but rather the expression for y′. Some tools from Lecture 3 could be useful. · Implementation of the code could be tricky. In particular, you will have to replace y by yf. Remember that substitution allows you to do such things. · Writing a computer program is hard, always takes me longer than I think it will take, and I’ve been doing it a long, long time. Don’t dawdle until the last minute, and ask any questions that arise. If you’re uncertain or stuck, I’ll be happy to take a look at what you have, or to give a hint or nudge in the right direction. Good luck!
1