Questions tagged [differential-equations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
19 views

Using nondimensionalization to solve an ode in MATLAB [duplicate]

I am trying to solve an ode that uses some extremely large numbers and some extremely small numbers, namely $$ e = 1.6\times 10^{-19}\\ E = 10^6\\ \tau = 6\times 10^{-24}\\ m = 9.1\times 10^{-31}\\ c ...
2
votes
1answer
61 views

MATLAB's ode45 not dealing with initial conditions well [RESOLVED]

*Concern highlighted in yellow *Solution at bottom I have a differential equation to solve for the motion of an electron: $$ \frac{d^2v}{dt^2} = \frac{1}{\gamma^6}\left( \frac{eE}{\tau m} - \left( \...
1
vote
1answer
69 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 ...
1
vote
1answer
96 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 ...
0
votes
0answers
15 views

Offline Parameter Estimation for second order system - Ordinary Least Squares

I have a second order system which is described by the following differential equation: $\ \ddot{y}+α_{1}*\dot{y}=b_{0}*u $ where $\ y $ is the output of the system and $\ u $ is the input of the ...
0
votes
0answers
40 views

Imposing decaying boundary conditions on a non linear ode

I am trying to solve $a^{2}y''=y+y^3$ numerically. This equation models a potential and goes to $\infty $ for $x\to0$ hence I get the singularity to be of order $\frac{1}{x}$ by keeping only the y^{3} ...
3
votes
1answer
107 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: ...
1
vote
1answer
69 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 ...
1
vote
1answer
68 views

Numerical methods for non-linear diffusion

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?...
1
vote
0answers
26 views

Book Recommendation: Analysis and design of mechanistic models - such as pharmacokinetics or hydrology models

I have been looking at an interesting book "Pharmacokinetic-Pharmacodynamic Modeling and Simulation" by Peter Bonate on pharmacokinetic models: the models of how medical drugs work their way through ...
2
votes
0answers
51 views

Numerical integration of SDE: choice of $dt$ and algorithm

I am working on the following Stochastic Differential Equation (SDE) in the Quantum Mechanics context: $$dX_{t} = a X_{t} dt + b X_{t} dW$$ where $X_{t}$ is my stochastic varible, $dt$ is my ...
0
votes
0answers
63 views

How one can simulate a system given by differential equation?

I want to simulate a diffusion environment given by the differential equation $$\frac{\partial u(x,y,t)}{\partial t}=D\left(\frac{\partial^2 u(x,y,t)}{\partial x^2}+\frac{\partial^2 u(x,y,t)}{\...
1
vote
0answers
51 views

Governing equations vs Transport equations

This is a basic question. But I did not find any explanations for this. How are governing equations, like mass, momentum, energy conservations equations, different from 'Transport equation'?. Is a ...
0
votes
0answers
57 views

What are the differences between these different forms of equation?

What are the differences between Conservative differential form, Non-conservative differential form, Conservative Integral form and Non-conservative integral form of differential equations? I know ...
1
vote
0answers
74 views

Solved : Damped spring-mass system, wrong position, correct speed and acceleration

I am modulating a spring-mass system with gravitation and aero drag, with python programming. The spring is hanging vertically and attached a weight. The user then selects a length to drag it down ...
4
votes
1answer
135 views

Fast and free server for computing

I have to calculate a huge differential equation. With my laptop, it's going to be computed for several days. Is there a free (I need just for 3 days) fast server for scientific calculations? My ...
2
votes
1answer
49 views

Symplectic linear multistep method?

I'm doing a gravitational n-body simulator and I'm thinking of implementing linear multistep methods like Adam-Bashforth. But is there any symplectic multistep methods?
1
vote
1answer
56 views

Online Parameter Estimation using steepest descent

I have a first order system which is described by the following differential equation: dx/dt = -a*x + b*u where u is the input <...
3
votes
2answers
107 views

Finite difference for a highly nonlinear equation - The wind within the forest

Based on the Navier-Stokes equations and a few parameterizations, the horizontal steady-state wind $u(z)$ within a forest of height H satisfies: $$ a\left(\frac{du}{dz}\right)^2 + b\frac{du}{dz} \...
3
votes
2answers
102 views

Damped Harmonic Oscillation. Efficient algorithm to find the parameters resulting in threshold oscillation amplitude

Let's assume, that we have damped harmonic oscillation of a body in the form of a cone, immersed in a liquid. Equilibrium condition of the body is: $$m\overrightarrow{a} = \overrightarrow{F_\text{...
1
vote
0answers
31 views

Why does the correlation function of this stochastic differential equation starts at different points?

I am working with the following differential equation: The equation is $$x=\beta +\sqrt{2D} \xi(t)$$ where $\xi(t)$ is a white noise term, with a reflecting wall boundary conditions. After solving ...
2
votes
0answers
70 views

How to implement adaptive step size Runge-Kutta Cash-Karp?

Trying to implement an adaptive step size Runge-Kutta Cash-Karp but failing with this error: ...
1
vote
1answer
189 views

Solving differential equation in Python with variable coefficients (I just know the coefficients numerically)

I am trying to implement a routine to solve a differential equation in Python. Basically the kind of equation that I am interested in solving is of the form: $\displaystyle \frac{d}{dx^2} \left(x y(x)...
0
votes
1answer
74 views

Stability of PDEs

I am currently trying to solve some PDEs with FiPy. At page 56, the manual mentions (https://www.ctcms.nist.gov/fipy/download/fipy-3.0.pdf). The largest stable timestep that can be taken for this ...
0
votes
1answer
83 views

Actual global error vs theoretical global error: How to combine theory with practice

I have implemented an Adams Bashforth 4 method to solve an Initial Value Problem for an ODE and I am testing it against the test equation: $y'=\lambda y$ with $y(0)=1$ with the exact solution: $y(t)=...
0
votes
1answer
101 views

Unexpected solutions solving an ODE using odeint

I am trying to solve a system of 8 coupled differential equations using scipy's odeint. I have already written my code and it runs fine, but the solutions I get are completely different from what I ...
0
votes
0answers
48 views

Determining the pseudo-time period of a system of $n$-pendulums via Kane's method in Python

We can use Kane's method to integrate the equations of motion for a system of $n$ pendulums with arbitrary masses and lengths (see derivation). In particular, if $(x_i,y_i)$ denotes the Cartesian ...
1
vote
1answer
42 views

Wrong results for $2$ stage multistep method $y_{n+2} - y_n = h\left[(1/3)f_{n+2} + (4/3)f_{n+1} + (1/3)f_n\right]$

I need to fix a code to utilise the $2$ stage multistep method : $$y_{n+2} - y_n = h\left[(1/3)f_{n+2} + (4/3)f_{n+1} + (1/3)f_n\right]$$ Since this is an implicit method, I used a Newton-Raphson ...
1
vote
0answers
39 views

Numerically solving a system of parabolic PDEs and 1st order ODEs

I'm trying to solve the following system of differential equations numerically. What are the available finite difference approaches and matlab solvers to solve such a system? Other approaches to solve ...
5
votes
1answer
128 views

Numerical solution of two coupled nonlinear eigenvalue problems

I would like to numerically solve the following system of coupled nonlinear differential equations: $$ -\frac{\hbar^2}{2m_a} \frac{\partial^2}{\partial x^2}\psi_a + V_{ext}\psi_a + \left( g_a |...
2
votes
1answer
91 views

Numerically solving a partial differential equation

I am trying to numerically solve the following PDE, $$\frac{\partial u^A}{\partial t} = c_1\frac{\partial^2 u^A}{\partial^2x} \,,$$ where $c_1$ is a constant. The above can be discretized using the ...
0
votes
0answers
79 views

why I cannot find explicit finite difference for elliptic equation

Let us think on the Poisson equation $\nabla^2 u(\bf{x})=\rho(x)$ with Neumann boundary conditions, with $\bf{x}=\it (x,y)$ in 2D. Here is a stencil with central differences in both $x$ and $y$ (...
1
vote
0answers
90 views

How to solve an implicit ODE with forward Euler?

Consider the implicit ODE $$ M(y)\dot{y} = F(t,y) $$ If $M$ is non-singular for all $y$ How to use the forward-Euler method to numerically solve for $y$ without inverting $M(y)$? I only came out ...
2
votes
1answer
78 views

PML boundary conditions

I set up two one-way wave equations for constant velocity $c$ in one-dimension. When I implement them I get a highly unstable (divergent) solution. I wonder if someone could give me a suggestion about ...
4
votes
3answers
182 views

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

I am using a second-order finite difference in space and time approximation for the 1D wave equation. No source but initial data: $I(x)=\mathrm{e}^{-400 (x-0.5)^2}$. Velocity $c=1$, $nx=501$, $nt=...
1
vote
1answer
231 views

How write a integration loop in fortran, leapfrog scheme to solvind PDE (advection)?

I want to resolve numerically this equation using of difference finite method with Leapfrog Scheme $$\frac{\partial{u}}{\partial t}+ v \frac{\partial{u}}{\partial x}= 0 $$ I'm trying to write a code ...
1
vote
1answer
146 views

Can a second-order ODE be “inconsistent” with its boundary conditions?

I am trying to solve a set of coupled, nonlinear ODEs. The only dependent variable is a 1-dimensional spatial coordinate, let's call it $x$. For now, I've managed to approximate away some of the ...
0
votes
1answer
51 views

Calculate forces on atoms from potential energy of system and position of atoms

Background I am using a neural network to calculate the potential energy of atoms in a configuration and then adding energy of all atoms to compare it with the true energy of the configuration(label) ...
4
votes
1answer
76 views

Symplectic Algorithms for Hamilton’s Equations as opposed to just Volume-Preserving

this might be a silly question, but if we’re trying to numerically solve Hamilton’s equations with some discrete scheme, sometimes when the scheme preserves phase space volume (Hamilton’s eqns are ...
2
votes
2answers
58 views

Discrete-time input matrix when one of the eigenvalues of the system matrix is zero

If we have a continuous time state-equation, $$ \dot{x}(t) = A x(t) + B u(t)$$ where $A \in \mathbb{R}^{n \times n}, x \in \mathbb{R}^{n\times1}, B \in \mathbb{R}^{n \times m}, u \in \mathbb{R}^{m \...
1
vote
0answers
59 views

fourth order Poisson iterative solver --in Matlab

I want to calculate the stream function $\psi$ starting from a velocity field $(u,v)$ (such that $u=-\frac{\partial\psi}{\partial y}$ and $v=\frac{\partial\psi}{\partial x}$). I thus calculate the ...
3
votes
1answer
38 views

Apart from initial discontinuities, what is tricky about neutral DDEs?

Background A neutral delay differential equation is one where the derivative does not only depend on its past state, but also the derivative at a past point: $$ \dot{y}(t) = f\big(t, y(t), y(t-τ_1), ...
25
votes
2answers
2k 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 ...
1
vote
0answers
16 views

Procedure to identify characteristic properties of unknown functions in a DAE model

I have a system of 1st order odes given by $$ \dot{x_1}(t) = \alpha_1 f_1(x_1,t) + \beta_1 u(t) \\ \dot{x_2}(t) = \alpha_2 f_2(x_2,t) + \beta_2 u(t) $$ They are constrained by an algebraic equation ...
2
votes
1answer
80 views

Jump-Diffusion process: practical solver beyond Euler method?

A jump-diffusion process is a stochastic process where both continuous noise (in my case complex Wiener noise $dZ,dZ^*$ such that $dZ^2=dZ^{*2}=0,|dZ|^2=dt$) and discrete Jumps (in my case Poissonian $...
1
vote
1answer
54 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 ...
0
votes
1answer
533 views

Crank–Nicolson method for nonlinear differential equation

I want to solve the following differential equation from a paper with the boundary condition: The paper used the Crank–Nicolson method for solving it. I think I understand the method after googling ...
0
votes
1answer
99 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 ...
5
votes
2answers
154 views

Algorithm for finding initial conditions of differential equations given trajectory

Let's say I'm given a system of three first-order differential equations in three variables, where all of the equations are known, and we additionally know the trajectory of two of the variables at a ...
1
vote
0answers
48 views

Second-order PDE with seven variables

I need to solve the following partial differential equation in seven variables with four boundary conditions. I don't think Mathematica has the capacity to solve this differential equation. Do you ...