{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hmwk2

# hmwk2 - function Note that to have access to this plotting...

This preview shows page 1. Sign up to view the full content.

Department of Chemical Engineering University of California, Santa Barbara Eng 5A Fall 2001 Instructor: David Pine Homework #2 Homework due: Wednesday, 10 October 2001 Reading: Mathematica Primer Chapters 3 1. (a) Use Mathematica to plot the slope (direction) field for the following nonlinear, first order ODE: dy dx = 6 - 4 x y 3 + y + 4 A convenient range to use is - 1 < x < 4 and - 3 < y < 2. (b) Using NDSolve , generate a particular solution to this ODE that satisfies the initial condition y (0) = 1. Overlay this solution on the slope field. (c) Solve this same initial value (IV) problem analytically by separating variables and integrating. After integrating, you will note that you cannot explicitly express your result in the form y = f ( x ), but instead will have a so-called implicit solution. Thus, to plot your result, you will need to use Mathematica’s
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: function. Note that to have access to this plotting function, you will ﬁrst have to load the appropriate Math-ematica graphics package by executing the command <<Graphics ` ImplicitPlot `. For a demonstration of using this function, look under ImplicitPlot in the Master Index under the Help menu in Mathematica . 2. Using Mathematica , implement Euler’s method to numerically solve: dy dx = 3 x-y, y (0) = 1 over the x interval (0 , 2). In your ﬁrst attempt, use a step size of h = 0 . 2. The ﬁnd the solution again using a step size half as large. Compare your numerical solutions with a solution obtained using NDSolve by overlaying the three solutions on the same plot. Refer to Demo 4 on the class web site for guidance in solving this problem....
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern