Questions tagged [differential-equations]

An equation that relates some unknown function itself and its derivatives of various orders.

An equation that relates some unknown function itself and its derivatives of various orders, for instance x'' = g (free fall) or x' = v (movement under constant speed). Developers solve differential equations numerically or write symbolic engines to solve analytically.

1488 questions
33
votes
2 answers

Get the minimal surface solution of a 3D contour

I have a set of 3D points defining a 3D contour. What I want to do is to obtain the minimal surface representation corresponding to this contour (see Minimal Surfaces in Wikipedia). Basically, this requires to solve a nonlinear partial differential…
23
votes
1 answer

How to combine an ODE system with a FEM system

I have a dynamic model set up as a (stiff) system of ODEs. I currently solve this with CVODE (from the SUNDIALS package in the Assimulo python package) and all is good. I now want to add a new 3D heat sink (with temperature-dependent thermal…
21
votes
6 answers

Differential Equations in Python

I'm working with a DE system, and I wanted to know which is the most commonly used python library to solve Differential Equations if any. My Equations are non Linear First Order equations.
Leon palafox
  • 2,675
  • 6
  • 27
  • 35
16
votes
4 answers

How to use Maxima's diff in function definition?

I want to use a function's derivative in an other function. How should this be done in Maxima? E.g: f(x) := 2*x^4; g(x) := diff(f(x),x)-8; Now g(x) yields 8x^3-8 as expected, but g(0) gives an error, since diff(f(0),0) doesn't make sense. But then…
shinjin
  • 2,858
  • 5
  • 29
  • 44
15
votes
2 answers

is there a c++ library for ordinary differential equation (ODE) solvers?

More specifically, i'm interested in 8th order Dormand-Prince embedded method, it's based on Runge-Kutta, and stiff equations. I use Numerical Recipes 3 but i often have trouble compiling their libraries. I'd like to know of alternatives.
kirill_igum
  • 3,953
  • 5
  • 47
  • 73
15
votes
4 answers

Numerical ODE solving in Python

How do I numerically solve an ODE in Python? Consider \ddot{u}(\phi) = -u + \sqrt{u} with the following conditions u(0) = 1.49907 and \dot{u}(0) = 0 with the constraint 0 <= \phi <= 7\pi. Then finally, I want to produce a parametric plot…
dustin
  • 4,309
  • 12
  • 57
  • 79
12
votes
3 answers

Help with symplectic integrators

I'm trying to develop a physics simulation and I want to implement a fourth-order symplectic integration method. The problem is that I must be getting the math wrong, since my simulation is not working at all when using the symplectic integrator (as…
11
votes
1 answer

Differential Equations in Java

I am trying to create a simple simulation program of SIR-epidemics model in java. Basically, SIR is defined by a system of three differential equations: S'(t) = - l(t) * S(t) I'(t) = l(t) * S(t) - g(t) * I(t) R'(t) = g(t) * I(t) S - susceptible…
Sergei G
  • 1,550
  • 3
  • 24
  • 44
11
votes
1 answer

IndexError: index 10 is out of bounds for axis 0 with size 10

I am numerically setting up a mesh grid for the x-grid and x-vector and also time grid but again I have set up an array for x (position) which should only be between 0 and 20 and t (time) would be from 0 until 1000 thus in order to solve a Heat…
Tonikami04
  • 177
  • 1
  • 2
  • 14
10
votes
2 answers

How do I plot a slope field using mathematica?

I am trying to plot slope fields of some differential equations using mathematica but can't figure it out. Say I have the equation y' = y(t) y(t) = C * E^t How do I plot the slope field? I found an example but way to complex for me to…
user968102
  • 503
  • 2
  • 6
  • 11
10
votes
2 answers

Need help solving a second order non-linear ODE in python

I don't really know where to start with this problem, as I haven't had much experience with this but it is required to solve this part of the project using a computer. I have a 2nd order ODE which is: m = 1220 k = 35600 g = 17.5 a = 450000 and…
Max Rackoff
  • 101
  • 1
  • 1
  • 4
10
votes
4 answers

Fitting data to system of ODEs using Python via Scipy & Numpy

I am having some trouble translating my MATLAB code into Python via Scipy & Numpy. I am stuck on how to find optimal parameter values (k0 and k1) for my system of ODEs to fit to my ten observed data points. I currently have an initial guess for k0…
Zack
  • 713
  • 2
  • 8
  • 21
9
votes
4 answers

how to identify turning points in stock price data

This question is a continuation of this one. My goal is to find the turning points in stock price data. So far I: Tried differentiating the smoothed price set, with the help of Dr. Andrew Burnett-Thompson using the centered five-point method, as…
Yaron
  • 1,540
  • 3
  • 19
  • 33
9
votes
2 answers

Absolute error of ODE45 and Runge-Kutta methods compared with analytical solution

I would appreciate if someone can help with the following issue. I have the following ODE: dr/dt = 4*exp(0.8*t) - 0.5*r ,r(0)=2, t[0,1] (1) I have solved (1) in two different ways. By means of the Runge-Kutta method (4th order) and by means…
8
votes
1 answer

How can I access the time variable in modelica

I would like to model an explictly time dependent differential equation in Modelica. Say I would like to model Real x(start=1); der(x) = t; in Modelica. What is the correct way to access the time variable t?
Hans
  • 1,741
  • 3
  • 25
  • 38
1
2 3
99 100