Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [differential-equations]

The tag has no usage guidance.

1
vote
0answers
72 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
52 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 ...
0
votes
0answers
48 views

Wrapped BVP with an unknown boundary for fluid modeling

I have a model about a fluid being extruded on a moving bed as in the 3D printing process. The model is a boundary-value problem where the right boundary is the point where the fluid attaches to the ...
5
votes
3answers
95 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=...
2
votes
0answers
62 views

How to solve Hamiltonian problems in Julia?

Unfortunately, I have not fountd any comprehensive example for Julia's 1.0 DiffEq.jl Hamiltonian problems. I am trying this: ...
0
votes
1answer
120 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
116 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
42 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
63 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 ...
0
votes
0answers
34 views

Resolution of a sequence of system of non-linear differential equations

Let, for all $k\in[\![1;N]\!]$ : $$ \begin{align} \dfrac{d I_k(t)}{d t} &= -\delta I_k(t) + \beta kS_k(t)\Theta(t)\\ \dfrac{d S_k(t)}{d t} &= - \beta kS_k(t)\Theta(t)\\ \dfrac{d R_k(t)}{...
2
votes
2answers
54 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 \...
0
votes
0answers
32 views

Minimum Residual Richardson Iteration for non positive definite matrix

I am trying to solve a matrix equation using a simple Minimum Residual Richardson method (http://depts.washington.edu/ph506/Boyd.pdf : page 304-306). I am using a finite difference matrix as ...
1
vote
0answers
45 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
34 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), ...
23
votes
2answers
1k 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
11 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
64 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
47 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
194 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
64 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 ...
6
votes
2answers
124 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
37 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 ...
1
vote
0answers
43 views

Eigenvalue ODE in Spherical Coordinates--Numerical

I wish to solve an eigenvalue problem: $$\nabla^{2}f=Ef $$ If I assume spherical symmetry $f(r,\theta,\phi)=f(r)$, I can reduce the problem to 1D: $$(\frac{2}{r}\frac{d}{dr}+\frac{d^{2}}{dr^{2}})f=...
1
vote
1answer
69 views

finite difference for a second order ode

I saw in a code for discretization of something like $\frac{d^2T(x)}{d^2x}$ , ( $x = sin(\theta)$ ) tries ...
1
vote
0answers
90 views

Solving complicated coupled ODE using RK4/ODE45 in Matlab

I have the following coupled differential equations also known as Guiding Center Approximation. It is used to explain the position- and velocity change of particles (electrons and protons, N = 1000) ...
3
votes
1answer
68 views

SIRS Model doesn't depend on initial conditions?

So i have been working (as an undergrad, by working i mean "Redoing a few things my professor does") in a SIRS model for epidemies. SIRS stands here for: Susceptible -> Infected -> Recovered -> ...
1
vote
0answers
76 views

Code for solving the heat equation on the semi-infinite rod

Cross posted in mathematica.SE. Question : I want to test the solution which is given below is right by Matlab/Maple/Mathematica. Please look the post in mathstackexhange or Please look below. ...
2
votes
1answer
98 views

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

Background: The solution space of original problem (which requires a fine enough mesh to resolve the microstructure) can be split into a macroscale solution space and microscale solution space. This ...
4
votes
3answers
105 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 $ ...
4
votes
2answers
148 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 ...
1
vote
1answer
1k views

How to simulate 3D diffusion in python?

I want to simulate a simple 3D diffusion (e.g., an ink released from one side of a vessel) using SciPy. There are some tutorials for one-dimensional diffusion. ...
1
vote
0answers
73 views

Implementing Neumann boundary condition in nonlinear integro-differential equation

Problem I would like to solve a nonlinear integro-differential equations on a 2D square domain $\Omega$ subject to Neumann boundary conditions using finite differences: $$\frac{\partial u}{\partial t}...
1
vote
1answer
134 views

solution of system of coupled partial differential equations [closed]

I have following system of coupled Partial differential equations. How can I solve the system by Maple? \begin{align} m_1\frac{\partial^2 u_1}{\partial t^2}+A_1\frac{\partial ^4u_1(x,t)}{\partial x^...
6
votes
3answers
945 views

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

My question is quite simple, but the more I look at it, the less content I am. My question is how to do a RK4 method for $y'=y$. At first I would assume the following: $$k_1=y_n$$ $$k_2=y_n+\frac{...
4
votes
1answer
118 views

Stability of PDE Discretizations with Multistep Time Discretizations

Let's pretend we have a spatially discretized PDE of the following form: \begin{align} \frac{\partial^2 \boldsymbol{u}^k}{\partial t^2} = D\boldsymbol{u}^k \end{align} where $D$ can be any form for ...
6
votes
3answers
233 views

Visualizing the solutions of the Differential equations by varying different parameters

Actually I am interested in analyzing the soution to the ODE given as $\frac{dy}{dx} = A + By + C\sin(y) , y(l) = m$ and check how the solution gets affected like whether they exist or not depending ...
0
votes
0answers
58 views

Software/code used to do this plot of homoclinic bifurcation

I saw this video https://www.youtube.com/watch?v=oEXeexvaAVo I find that user friendly to visualize the dynamics. I am curious on how, like on which software he did the code,also any reference guide ...
1
vote
0answers
44 views

How is the Gastner-Newman equation implemented to create value-by-area cartograms?

There is a paper called "Density-equalizing map projections: Diffusion-based algorithm and applications" by Michael T. Gastner and M. E. J. Newman, which explains their algorithm (which is based in ...
0
votes
1answer
88 views

Stability of dark solitons in a harmonic trap

This question is based upon a research article which I am trying to reproduce. One of the main result of this paper is the condition on transverse confinement of the Bose-Einstein Condensate(BEC) to ...
2
votes
1answer
86 views

Mysterious Mirroring in Analytical Solution of a delay differential equation (DDE)

I'm struggling now for several weeks with a very bizarre problem with a system of delay differential equations. First, here the system: $$\dot a = 1 - \Theta(b(t-\tau)-\kappa) \,- a(t) \\ \dot b = \,...
1
vote
0answers
119 views

Nonlinear 2D thermoconductivity equation(numerical solution) [closed]

I have to write a solver for 2D equation: $$\partial_t u = u^2(\partial_x ^2 u + \partial_y ^2 u)$$ I try to use explicit method: $$\partial_t u = \frac{u_{i,j}^{k+1} - u_{i,j}^k}{\tau}$$ and $$\...
4
votes
0answers
168 views

MATLAB: solving multiple ODE systems in parallel

I have a system of parameterized ODEs that I would like to solve using MATLAB and its ode45 solver, and was wondering if it is possible to perform such a task in ...
2
votes
1answer
706 views

Solving an iterative, implicit Euler method in MATLAB

I'm trying to solve an iterative problem that includes an implicit (backwards) Euler method to find successive time values for a given function. The numerical problem is shown here: $$ \begin{...
4
votes
2answers
818 views

Small errors accumulate while solving ODE of motion

I'm trying to solve the ODE of motion: $$ \begin{align} x''=&\ -myu \frac{x}{r^3} \left(1+\frac{3}{2} {J_2} \left(\frac{{r_{\text{eq}}}}{r}\right)^2 \left(1-\frac{5z^2}{r^2}\right)\right) \\ ...
0
votes
1answer
157 views

Numerical solution of nonlinear thermoconductivity equation

I have to find and plot a numerical solution for the following equation (I have to write a solver): $$u_{t} = (u^2 u_x)_x$$ with the following conditions $u(0,t) =0, u(1,t) = \sqrt{\frac{2c-2}{t}}, u(...
1
vote
2answers
145 views

Can Runga-Kutta method be used to solve non-linear differential equations?

Consider two-body central force problem in polar co-ordinates $r,θ$. Corresponding 2nd order differential equation is obtained by using conservation of angular momentum. This equation is : $ d^2r/dt^...
4
votes
1answer
79 views

Finding Numerical Stability of Simple System with Integral Term Due to Low Pass Filter

As a toy problem, I was looking at a classical second order system of the following form: \begin{align} \ddot{x}(t) + c \dot{x}(t) + k x(t) = 0 \end{align} Instead of the basic system above, I want ...