Sciencemadness Discussion Board
Not logged in [Login ]
Go To Bottom

Printable Version  
Author: Subject: Wolfram Alpha's "DSolve"
blogfast25
International Hazard
*****




Posts: 10562
Registered: 3-2-2008
Location: Neverland
Member Is Offline

Mood: No Mood

[*] posted on 2-3-2015 at 18:54
Wolfram Alpha's "DSolve"


Does anyone here have any experience with Wolfram Alpha's DSolve computational database for solving ODEs?

http://reference.wolfram.com/language/tutorial/DSolveOvervie...

A few quick initial tests got me quite excited.




View user's profile View All Posts By User
Metacelsus
International Hazard
*****




Posts: 2539
Registered: 26-12-2012
Location: Boston, MA
Member Is Offline

Mood: Double, double, toil and trouble

[*] posted on 3-3-2015 at 06:38


I've used Mathematica's DSolve function before, and it's quite good.



As below, so above.

My blog: https://denovo.substack.com
View user's profile View All Posts By User
blogfast25
International Hazard
*****




Posts: 10562
Registered: 3-2-2008
Location: Neverland
Member Is Offline

Mood: No Mood

[*] posted on 3-3-2015 at 10:08


Quote: Originally posted by Cheddite Cheese  
I've used Mathematica's DSolve function before, and it's quite good.


Thanks for queuing in an orderly fashion to answer my question! ;)

[Edited on 3-3-2015 by blogfast25]




View user's profile View All Posts By User
Oscilllator
National Hazard
****




Posts: 659
Registered: 8-10-2012
Location: The aqueous layer
Member Is Offline

Mood: No Mood

[*] posted on 3-3-2015 at 15:01


I used MAPLE a bit at my university for questions like this, before switching to wolfram alpha because it has a much more user friendly interface that can tolerate a missing semicolon.
View user's profile View All Posts By User
sparkgap
International Hazard
*****




Posts: 1234
Registered: 16-1-2005
Location: not where you think
Member Is Offline

Mood: chaotropic

[*] posted on 3-3-2015 at 15:41


Speaking as a heavy Mathematica user: DSolve[] does pretty well for almost all linear ODEs and some nonlinear ODEs. If your ODE is listed in the Handbook of Exact Solutions for Ordinary Differential Equations, or is convertible into a form listed there, DSolve[] can likely deal with it. (Certainly, don't expect the function to be able to handle, say, the Painlevé or Chazy equations!)

sparky (~_~)

P.S. PDEs are a different kettle of fish, as you might already know.




"What's UTFSE? I keep hearing about it, but I can't be arsed to search for the answer..."
View user's profile View All Posts By User
blogfast25
International Hazard
*****




Posts: 10562
Registered: 3-2-2008
Location: Neverland
Member Is Offline

Mood: No Mood

[*] posted on 3-3-2015 at 16:29


It's supposed to do PDEs as well, no?

http://reference.wolfram.com/language/ref/DSolve.html

I still haven't found a direct way to integrate f(x) between say x<sub>1</sub> and x<sub>2</sub>, though...




View user's profile View All Posts By User
annaandherdad
Hazard to Others
***




Posts: 387
Registered: 17-9-2011
Member Is Offline

Mood: No Mood

[*] posted on 4-3-2015 at 10:08


Quote: Originally posted by blogfast25  


I still haven't found a direct way to integrate f(x) between say x<sub>1</sub> and x<sub>2</sub>, though...


What do you mean by a direct way? Do you want a formula, or a numerical answer? Packages like Mathematica will do both, although of course a formula isn't always available. If you want to know how the numerical integration works, try reading Numerical Recipes for starters. Romberg integration works well on analytic integrands, and is very interesting too.




Any other SF Bay chemists?
View user's profile View All Posts By User
blogfast25
International Hazard
*****




Posts: 10562
Registered: 3-2-2008
Location: Neverland
Member Is Offline

Mood: No Mood

[*] posted on 4-3-2015 at 13:25


Quote: Originally posted by annaandherdad  
If you want to know how the numerical integration works, try reading Numerical Recipes for starters.


Do I sound like someone who doesn't know that? ;)

I haven't found the DSolve syntax for ∫f(x)dx between x<sub>1</sub> and x<sub>2</sub> yet.

Integrating y'(x) = f(x) with DSolve is no problem.

[Edited on 4-3-2015 by blogfast25]




View user's profile View All Posts By User
annaandherdad
Hazard to Others
***




Posts: 387
Registered: 17-9-2011
Member Is Offline

Mood: No Mood

[*] posted on 4-3-2015 at 14:54


Quote: Originally posted by blogfast25  
Quote: Originally posted by annaandherdad  
If you want to know how the numerical integration works, try reading Numerical Recipes for starters.


Do I sound like someone who doesn't know that? ;)

[Edited on 4-3-2015 by blogfast25]


Sorry, didn't mean any offense.

However, to repeat, Romberg integration is very cool, and there's a beautiful theory underlying it.

[Edited on 4-3-2015 by annaandherdad]




Any other SF Bay chemists?
View user's profile View All Posts By User
sparkgap
International Hazard
*****




Posts: 1234
Registered: 16-1-2005
Location: not where you think
Member Is Offline

Mood: chaotropic

[*] posted on 9-3-2015 at 23:39


Quote: Originally posted by blogfast25  
It's supposed to do PDEs as well, no?


It can do PDEs, but not very elaborate ones. So, don't expect it to be able to deal with something like Korteweg-de Vries. Separable PDEs ought to be a snap.

Quote: Originally posted by annaandherdad  

Romberg integration is very cool, and there's a beautiful theory underlying it.


Romberg is certainly neat, but that algorithm is in the context of definite integration as opposed to the integration of differential equations. The Richardsonian method that is the direct analog of Romberg for differential equations is the Bulirsch-Stoer method. Completely analogous to Romberg, one starts with approximations to the solution with increasing step fineness, and then uses polynomial extrapolation to obtain a (supposedly) more accurate estimate.

The method is numerical and not symbolic, but then again, there aren't that many DEs that admit closed-form solutions.

sparky (~_~)




"What's UTFSE? I keep hearing about it, but I can't be arsed to search for the answer..."
View user's profile View All Posts By User
annaandherdad
Hazard to Others
***




Posts: 387
Registered: 17-9-2011
Member Is Offline

Mood: No Mood

[*] posted on 10-3-2015 at 08:18


Thanks for the note, I didn't know that about Bulirsch Stoer. In my work we use symplectic integrators, but they only work for Hamiltonian ode's. But you're making me wonder if a Hamiltonian version of the Romberg-Bulirsch-Stoer idea is known.

Of course pde's are another game. Our group has been thinking lately about multisymplectic integrators for nonlinear pde's.

One reason I find Romberg integration interesting is that if you start with the Poisson sum formula for a periodic delta function, you can get an explicit remainder term for the trapezoidal rule, which reveals a lot of information about the approximation. For example, there are interesting games you can play, playing the log function (integral of 1/x) against the harmonic sum.




Any other SF Bay chemists?
View user's profile View All Posts By User
sparkgap
International Hazard
*****




Posts: 1234
Registered: 16-1-2005
Location: not where you think
Member Is Offline

Mood: chaotropic

[*] posted on 10-3-2015 at 19:01


Quote: Originally posted by annaandherdad  
Thanks for the note, I didn't know that about Bulirsch-Stoer. In my work we use symplectic integrators, but they only work for Hamiltonian ode's. But you're making me wonder if a Hamiltonian version of the Romberg-Bulirsch-Stoer idea is known.


I've seen attempts, but I've no experience with them.

sparky (~_~)




"What's UTFSE? I keep hearing about it, but I can't be arsed to search for the answer..."
View user's profile View All Posts By User
smaerd
International Hazard
*****




Posts: 1262
Registered: 23-1-2010
Member Is Offline

Mood: hmm...

[*] posted on 30-8-2015 at 09:24


blogfast we used DSolve in my ODE course after we learned the graphical means of solving ODE's. It's quite powerful I play with it once and a while on my raspberrypi (Mathematica is free for the device).

As far as symbolic integration Mathematica has been doing this for a long time with clean integrals. Obviously not all integrals are solvable. It's how I used to check my calculus 2 homework. Edit - granted it often takes the long way around, and can give weird variants of solutions(sometimes in awful forms). Explicit integration is definitely possible I forget the syntax but even wolframalpha.com can do it.

A few months back I started attempting to write some code that gave symbolic taylor and mclauren expansions for solving some basic ODE's via power series etc. Very cumbersome process and I had to abandon it out of a lack of a clean way to express the mathematical language in syntax.

I tried teaching myself PDE techniques a year or so ago. It's hard to find a good book about it. It seemed to me that there is no real general means once a PDE is not seperable and is more of an art in applying all of the worlds mathematics in a case by case basis, and obscure transformations. If anyone has any suggestions for texts or resources please let me know. I'm very interested in numerical solutions and simulations for fluid mechanics(openFOAM, etc) especially in the presence of external fields (magnetohydrodynamics).

[Edited on 30-8-2015 by smaerd]




View user's profile View All Posts By User
blogfast25
International Hazard
*****




Posts: 10562
Registered: 3-2-2008
Location: Neverland
Member Is Offline

Mood: No Mood

[*] posted on 30-8-2015 at 09:41


I've been using DSolve quite a bit by now and it's quite amazing what it can do. And for my kind of use I've probably not even pushed the capability envelope.

I got some nice DSolve results with second order DEs, like Schrodinger's equation for various types of bound electrons.




View user's profile View All Posts By User
aga
Forum Drunkard
*****




Posts: 7030
Registered: 25-3-2014
Member Is Offline


[*] posted on 30-8-2015 at 12:27


Quick check : you're all still speaking English right ?



View user's profile View All Posts By User
smaerd
International Hazard
*****




Posts: 1262
Registered: 23-1-2010
Member Is Offline

Mood: hmm...

[*] posted on 22-9-2015 at 15:40


Think I might of found some ODE's that Mathematica can't solve! Solver has been running for 20 minutes without returning anything. Not good as this was an expected problem in my Kinetics course...



View user's profile View All Posts By User
blogfast25
International Hazard
*****




Posts: 10562
Registered: 3-2-2008
Location: Neverland
Member Is Offline

Mood: No Mood

[*] posted on 22-9-2015 at 16:19


Quote: Originally posted by smaerd  
Think I might of found some ODE's that Mathematica can't solve! Solver has been running for 20 minutes without returning anything. Not good as this was an expected problem in my Kinetics course...


Which problem?

A couple of days ago it gave up on a non-linear DE of mine too.

[Edited on 23-9-2015 by blogfast25]




View user's profile View All Posts By User
annaandherdad
Hazard to Others
***




Posts: 387
Registered: 17-9-2011
Member Is Offline

Mood: No Mood

[*] posted on 22-9-2015 at 19:52


Quote: Originally posted by smaerd  

A few months back I started attempting to write some code that gave symbolic taylor and mclauren expansions for solving some basic ODE's via power series etc. Very cumbersome process and I had to abandon it out of a lack of a clean way to express the mathematical language in syntax.


Is this the kind of thing you were trying to do?

http://www.sciencedirect.com/science/article/pii/08981221940...

Chang is a friend of mine, I'm kind of familiar with what he did.




Any other SF Bay chemists?
View user's profile View All Posts By User
smaerd
International Hazard
*****




Posts: 1262
Registered: 23-1-2010
Member Is Offline

Mood: hmm...

[*] posted on 23-9-2015 at 10:36


@blogfast - it's a brutal ODE. I had to use a Newton-Raphson solver to find a hairy cubic root of a trinomial which had a symbolic value in it (artifact of a substitution). Then I grabbed the only real root and chucked that into a rate equation and asked mathematica to try and solve it. No dice, and I've checked my preliminary steps fastidiously (not a gaurantee to be free from error but not very likely). No clue how this will copy and paste,
Quote:
sol = DSolve[{Z'[t] ==
2*k3*(0.005747126436781609` (-5000.` -
29.` Z[t]) + (3.991060025542784`*^-31 \
(-3.60000112752`*^39 - 4.2486624`*^37 Z[t] -
1.21104`*^35 Z[t]^2))/(1.25000058725`*^23 +
2.2128453406053803`*^21 Z[t] +
1.2834501386019`*^19 Z[t]^2 + 2.3367185`*^16 Z[t]^3 +
150.68842025849233` \[Sqrt](-5.062677114182215`*^28 -
6.524644065161255`*^31 Z[t] -
2.1021533165696234`*^34 Z[t]^2 -
1.1499480491088463`*^34 Z[t]^3 -
1.9986292528062663`*^32 Z[t]^4 -
1.15510429551571`*^30 Z[t]^5 -
2.149028325`*^27 Z[t]^6))^(1/3) -
5.747126436781609`*^-7 (1.25000058725`*^23 +
2.2128453406053803`*^21 Z[t] +
1.2834501386019`*^19 Z[t]^2 + 2.3367185`*^16 Z[t]^3 +
150.68842025849233` \[Sqrt](-5.062677114182215`*^28 -
6.524644065161255`*^31 Z[t] -
2.1021533165696234`*^34 Z[t]^2 -
1.1499480491088463`*^34 Z[t]^3 -
1.9986292528062663`*^32 Z[t]^4 -
1.15510429551571`*^30 Z[t]^5 -
2.149028325`*^27 Z[t]^6))^(1/3))^2 - k33*Z[t],
Z[0] == 0}, Z[t], t]


@anaandherdad - Chang succeeded and went miles over where I ended up. I'll have to read the paper to see how they handled these problems more in depth but what they did at first glance is interesting. I'm not seeing how they handled symbolic notation yet though.


Is there any work around methods to plotting a Rate-law expression without integrating/solving the ODE? Like can I use the right hand side of a rate expression to denote the change and somehow step that through time?

[Edited on 23-9-2015 by smaerd]




View user's profile View All Posts By User

  Go To Top