![]() |
ApplicationsBrown University, Applied Mathematics |
MuPAD can plot many kinds of functions for you. Different kinds of plots are denoted by the extra '::' add on after the word 'plot'. The only tricky part is that sometimes you have to call 'display(%)' right after the function so that it will actually show up. Some of these kinds of plots even include animations when you click on them! To interact with plots, double click on the image and you should be able to move around, which can be very useful for 3 dimensional plots.
The beauty of Mupad is that you can plot anything using the magical command ‘display(%)’. Now to solve an initial value problem you can use the command ‘IVP := ode({“diffeqn.”, “initial value(s)”}, y(x))’. Breaking down the code: “IVP” is just the name I randomly assigned to the equation and it can be replaced with any letter. “ode” is the built-in Mupad function that solves differential equations. (In it’s sleep) “diffeqn” is the differential equation you wish to solve. “initial value(s)” are the initial conditions and “y(x)” is there for syntax purposes.
IVP := ode({y'(x)= -2*x*y(x), y(0)=1}, y(x))
solve(IVP)
display(%)
Another example
plot(solve(a), x=a..b)
Home |
< Previous |