# Questions tagged [differential-equations]

The tag has no usage guidance.

108 questions
Filter by
Sorted by
Tagged with
50 views

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

I am trying out odeint and received the error 'Excess work done on this call (perhaps wrong Dfun type).'. The values returned are also super sensitive to small ...
28 views

### Odeint error for nonlineal differential equations

I receive the following error when I run the code. ODEintWarning: Excess work done on this call (perhaps wrong Dfun type). Run with full_output = 1 to get quantitative information. warnings.warn(...
140 views

### Numerical computation of Lyapunov exponent

I'm trying to compute the Lyapunov exponent for a smooth continuous time dynamical system(say, $\dot{\bar{x}} = f(\bar x)$). I using the QR decomposition method. Here are the steps that I follow. ...
135 views

### How to get a more accurate cancelation

I shall try to get to the point, so let me know if there is something left and you need more details. I am solving a couple of equations that are not coupled explicitly, but their corresponding ...
105 views

118 views

### Numerically finding constants of motion

Given a set of ODE's $\dot{z} = f(z)$ (or discrete time $z_{t+1} = f(z_t)$), is there a way to numerically find constants of motion? For $f(z_t) \approx M z_t$, diagonalizing the matrix $M$ ...
116 views

### Runge-Kutta timestep in atomic units

I'm using 4th order RK to solve the schroedinger equation in atomic units. Say I want to simulate 400fs in intervals of h=10fs, then in atomic units this is h=413a.u and 400fs=16500a.u. 4RK involves ...
313 views

### Runge Kutta and Milstein – system of second-order coupled differential equations with noise

I would like to solve a system of second-order differential equations to describe the dynamics of a system of particles. Two Newton-like forces are responsible for the motion of each particle $i$: A ...
58 views

### Integrating a nonlinear ordinary differential equation

I am solving an equation of the form $(*)$ $0 = a(f) (\partial_rf)^2 + b(f) (\partial_rf) + c(f),$ where $f$ is a real function of $r\in \mathbb{R}$, and $a,b,c$ are real functions of $f$. The ...
132 views

### Solving numerically a linear ODE

I start by saying that I do not have a strong background in numerical analysis, so I may miss some basic things or make trivial mistakes. Motivated by some problems in digital signal processing, I ...
187 views

### Lambdifying a symbolic matrix in Julia

If I have a symbolic matrix defined as T below, is there any way to lambdify this as function of variables, say σ..., and return ...
4k views

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

In this comment I wrote: ...default SciPy integrator, which I'm assuming only uses symplectic methods. in which I am refering to SciPy's odeint, which uses ...
73 views

### Methods for solving discrete PDEs using algorithmic differentiation results

I'm looking for a method to solve a 20000 variable, 20000 residual non-linear PDE with a Galerkin method. I have Fortran subroutines for: The residuals: $\vec{r}(\vec{x})$; Their Jacobian multiplied ...
49 views

### Solver for large dense BVP system in python

I have a large system of boundary value problems of the form $$\frac{d^2 y }{dt^2} = C(t) y + b(t),$$ where the variable $y$ is a vector that has anywhere from 50 to around 500 components, $C$ is a ...
120 views

### Finite difference method having a discontinuity

I am trying to understand the FDM which is a widely used method solving differential equations by using approximation below. $$\dfrac{\partial u}{\partial x}=\dfrac{u(i+1)-u(i-1)}{2\Delta x}$$ How can ...
91 views

### Two RK4 method in one program

I want to solve this integral using RK4 by coding in Fortran: $$R=∫1/a(t) dt → dR/dt=1/a(t) =f(t)$$ Initial point: t=0 (or a=0.001) and R=0 And I have to get a(t) by solving another ...
28 views

2k views

### Solving coupled differential equations in Python, 2nd order

I have a system of coupled differential equations, one of which is second-order. I am looking for a way to solve them in Python. I would be extremely grateful for any advice on how can I do that! $k$...
71 views

### Numerical method for harmonic oscillator with jumping constant

Let $k_1 \neq k_2$ be positive reals, $t_0 > 0$ and consider the following Cauchy problem in $[0,+\infty)$: \begin{cases} y(t) + k(t)y''(t) = 0 \newline y(0) = 1/\sqrt{k_1} \newline y'(0) = 0, \end{...
49 views

### Modelling of Stefan Maxwell equation

I am trying to solve Maxwell Stefan's equation over a membrane to get the transient mole fraction distribution over the membrane thickness 'z'. But somehow I am not able to code it using ODE45, more ...
54 views

### How to solve odd-order differential equations in FEM? Petrov-Galerkin?

I've recently learned about using weighted residuals with the Galerkin method to numerically approximate even-order differential equations (for linear elements, I'm still a beginner). It seems for odd-...
65 views

107 views

45 views

53 views

### Dealing with boundary conditions using Fourier spectral methods

I am currently working on a project where I need to use Fourier spectral methods to solve the KS equation. I found this code which is using the Fourier spectral methods to solve the classic 1D heat ...
414 views

### Numerically solving a partial differential equation in python with Runge Kutta 4

I'm supposed to solve the following partial differential equation in python using Runge-Kutta 4 method in time. $$\frac{\partial}{\partial t}v(y,t)=Lv(t,y)$$ where $L$ is the following linear ...
435 views

### Numerical Solution to Rayleigh Plesset Equation in Python

I have been trying to numerically solve the Rayleigh-Plesset equation for a sonoluminescence bubble in Python. You can read about this phenomenon here: https://iopscience.iop.org/article/10.1088/0143-...
54 views

### Stably solve transport equation with source term

I am trying to solve a transport equation of the form for the variable $\psi(t,r)$ \begin{equation} \partial_t\psi-\alpha(r)\partial_r\psi-\beta(r)^2\psi-f(t,r)=0 , \end{equation} where I am solving ...
104 views

112 views

### Crank-Nicholson for diffusion-advection vs diffusion equation

Let's consider the following 1D diffusion equation: $\frac{\partial u}{\partial t} = xk \frac{\partial}{\partial x}(\frac{1}{x}\frac{\partial u}{\partial x})$ where we assume that the diffusion ...
122 views

### Numerical integration in 2D

I would like to solve the following problem $$\vec{v}(x,y)= k\, \nabla \theta(x,y)$$ with respect to the unknown function $\theta$. Parameter $k$ is just a real constant quantity. I have two ...
176 views

### Solving an SDE with time-dependent parameter in R

I am trying to solve a system of SDEs in R using the Diffeqr package. Let's reduce the system to a simple ODE: ...
89 views

### How to Break Coupled ODEs down to first order for Runge-Kutta

My question might seem a bit simple. I am trying to solve a system of ODEs using Runge-Kutta method. I am having difficulty breaking down the equations into a system of first order ones required ...
I have the following non-linear diffusion equation, for $\ z(x,t)$: $\ z_t = -C(\sin(\omega t))^m x^{hm}(hm x^{-1}(z_x)^n + n z_{xx} (z_x)^{n-1})$ Any advice for numerical (or analytical) solutions?...