# Tag Info

Accepted

### What does "symplectic" mean in reference to numerical integrators, and does SciPy's odeint use them?

Let me start off with corrections. No, odeint doesn't have any symplectic integrators. No, symplectic integration doesn't mean conservation of energy. What does ...

### What does "symplectic" mean in reference to numerical integrators, and does SciPy's odeint use them?

To complement Chris Rackauckas answer, to state some of the mathematical nonsense as well as some stuff you almost certainly know, a dynamical system is Hamiltonian if there is a description with ...
Accepted

### CUDA & Python for numerical integration and solving differential equations

Julia's DifferentialEquations.jl is all GPU-compatible. If you make your arrays GPU-based arrays, then the solver recompiles to be all on the GPU (no data transfers). For example: ...
Accepted

### How can I numerically integrate the Kepler problem?

I'm going to assume for the moment that your code is correctly implemented and that this problem isn't a bug. Believe it or not, gradual increase of the energy is the expected behavior of most simple ...

### How to solve a second order differential equation (diffusion) with boundary conditions using Python

I have found that I must keep the value of dt near dx or the results become unstable This behavior you have noticed is known as the Courant–Friedrichs–Lewy (CFL) condition. Indeed, there are ...
Accepted

### 4th order Runge-Kutta for $y' = y$

The answer is quite simple. You are already comparing apples and oranges in the first equation. Garbage in, garbage out. The equation $y'=y$ if written properly is $$dy/dx=y.$$ Do you see it now? To ...

### Finite difference for 1D wave equation: why the spike initial data results in a noisy output?

I think you're probably seeing artifacts that are due to numerical dispersion. In brief, in the discrete case different (spatial) frequencies of a wave function will propagate at different phase/group ...
Accepted

### Some questions on Trace (operators) on the boundary in the context of PDEs

I think the quote from Wikipedia is misleading (and I should put that on my list of things to fix :-) ). You can think of the trace of a function $u: \Omega \rightarrow {\mathbb R}$ that lives on a ...

Accepted

### Solving the heat diffusion equation with source term

You are starting from a uniform temperature and you have insulated boundary conditions; so there is no heat conduction occurring. Likewise, your initial mole fraction is also constant in $x$ so that ...
Accepted

### scipy odeint: excess work done on this call and very sensitive to initial value

Essentially, by combining all the constant factors, your ODE is $$\frac{dL}{dt} = -A + B L + C L^2$$ With the initial $L(0)=L_0$ large enough, the positive feed-back of the quadratic term drives ...
Accepted

### How to set up the differential equation system to speed up computation?

Some things I can think of: use sparse matrices for Matrix1 and Matrix2 to speed up the computations of ...
Accepted

### 2-DOF Robotic Manipulator Trajectory Tracking Simulation

As far as I understand the fist part of your question is regarding the options of the ode15s, and which ones you can use to make the solver more efficient/accurate. ...

### Numerical integrator for $a'(t)=e^{-a(t)}f(t)$

You want a numerical solution, but this might help you check your computed results. If $a$ satisfies the ODE, you know $e^{a(t)}a'(t) = f(t)$. Integrating you get \begin{align} \int_0^t\, f(\tau)\, d\...

### Solving numerically the 1D Kuramoto-Sivashinsky Equation using spectral methods

Indeed the problem was that you were trying to calculate your nonlinear term incorrectly and you forgot that: $$\mathcal{F}[(f(x))^{2}] \neq (\mathcal{F}[f(x)])^{2}$$ I changed your code to this: <...
Accepted

### Recommendations for ODE solvers for stiff equations

This is a huge open ended question, but I'll copy the recommendation section from the current release of DifferentialEquations.jl: Stiff Problems For stiff problems at high tolerances (>1e-2?) it ...

### Is there a Python version of the ODE tool pplane?

I do not really know how much this can help you, but maybe you can use this code for rough sketches of the dynamics of planar vector fields. I know that it does not have the functionality that you may ...
Yes you can. If the term that multiplies $N$ is never zero, then $N$ is an algebraic variable of index 1. Its combination with the ODEs on $x$ yields a system of differentiel-algebraic equations (DAEs)...
This is absolutely possible. For example, say you're solving the advection equation $$\frac{\partial q}{\partial t} + \nabla\cdot q\,\mathbf u = 0$$ for the field $q$ using your favorite technique for ...