Post Reply 
Syntax for Differential Equations Solver / desolve()???
09-04-2015, 11:10 PM
Post: #6
RE: Syntax for Differential Equations Solver / desolve()???
Finally was able to solve the problem I started out working on. This only took me 48 hours to figure out...(my son is taking a DiffEq course, it's only been 3 decades since I took mine so my skills are, uh, rusty. They are solving this thing manually and I just wanted to confirm the final answer using my shiny new HP Prime. A mere 48 hours later, after a shocking lack of info from google, I finally have my answer, and thought I might share what I learned for the next google-starved victim researching this same question.)

Differential equation: y' - 2y = xe^x
Boundary condition: y(0) = 1

You must ensure nothing is stored in x or y. Mem (shift toolbox), highlight "User Variables", backspace will allow you to clear them all. Thanks for that advice to the user above, that was the enabling step. Once that is done:

Keystrokes:
Code:

CAS
Toolbox / CAS / Solve / Differential Equation (results in desolve() on command line)

Now key in the differential equation and boundary condition in a [] vector, followed by the dependent variable y after the vector. The Help example accomplishes the same thing with AND statements rather than the [] vector, but I find the vector method more elegant.

Code:

desolve([y'-2y=x*e^x  y(0)=1],y)
enter

results in
Code:

-x*e^x - e^x + 2*e^(2*x)

Items of note:
- near as I can tell, you cannot use the dy/dx template, you must enter the differential in y' form. Disappointing.
- you must explicitly put the multiplication star between x and e^x, otherwise it thinks you've created a new variable xe and won't implicitly insert the multiplication
- as mentioned, for some reason the variables x and y cannot have anything previously stored in them. I find this puzzling but it seems to be important, so...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Syntax for Differential Equations Solver / desolve()??? - ewjax - 09-04-2015 11:10 PM



User(s) browsing this thread: 1 Guest(s)