Questions tagged [differential-equations]

For questions about solving, analyzing, or creating differential equations to model some system. If possible, include specific tags about the type of differential equation (e.g. [tag:pde], [tag:ode], [tag:stochastic-ode]).

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Step size constraint in Euler backward

I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on ...
user46892's user avatar
1 vote
0 answers
41 views

Solution to the Liouville-Gibbs equation

What would be the approach to numerically solve for $\rho(x,t)$ the following equation with some initial conditions $$\frac{\partial\rho}{\partial t} +\sum_{i=1}^n\left(\frac{\partial(\rho g_i)}{\...
homocomputeris's user avatar
1 vote
0 answers
30 views

Implementation of operator splitting method for Wigner equation

I am dealing with the integro-differential equation for Wigner function, $$\frac{\partial f}{\partial t}+p\frac{\partial f}{\partial x}+\\+\frac{1}{\chi}\left\{\int_{-\pi}^{+\pi}dy\,\int_{-\infty}^{+\...
Artem Alexandrov's user avatar
1 vote
0 answers
136 views

FEM for nonlinear first-order ODE

Currently I am trying to solve nonlinear Ricatti equation using FEM (Matlab language): $$\frac{d r(z)}{dz} = i k(z) r(z) + \frac{i k(z)}{2}(\epsilon(z) - 1)(1 + r(z))^2$$ $z = [-h/2, h/2]$ and $r(-h/2)...
Andrew's user avatar
  • 31
1 vote
2 answers
111 views

Is there any way to reduce an RK4 method's dependence on step size?

I am working in the sphere of orbital simulations, where orbital trajectories are computed using the differential equations describing gravity. Due to the great timescales of orbits, a step size of ...
JS4137's user avatar
  • 133
1 vote
1 answer
69 views

Why does a two-body simulation result in no change of the y-component?

I've been attempting to create a model of a heliocentric orbit based on Newton's law of gravitation: $$ \frac{d^2 \vec r}{dt^2} = -\frac{GM}{|r|^2} \hat r $$ This is what I have so far: ...
JS4137's user avatar
  • 133
2 votes
2 answers
926 views

Numerical implementation of ODE differs largely from analytical solution

I am trying to solve the ODE of a free fall including air resistance. I therefore defined my ODE as: def f(v, g, k, m): return g - k/m * v**2 which in my ...
Axel's user avatar
  • 123
1 vote
0 answers
131 views

Using Sundials CVODE in MATLAB

I'm currently using ode15s to solve a set of stiff differential equations. I am trying to use the MATLAB profiler to understand the section of the ode solver code which calls BLAS routines. Since the ...
Natasha's user avatar
  • 411
4 votes
1 answer
648 views

Is my differential equation solving code wrong?

I am trying to simulate LLG equation without damping. The equation is $$\frac{d\vec{m}}{dt} = \vec{m}\times\vec{H}$$ I am solving in spherical coordinates as LLG equation is known to have problems in ...
User's user avatar
  • 141
1 vote
0 answers
37 views

How does the time needed for force propagation increase with the discretization (using symplectic Euler schemes)?

I am trying to model a physical system by (lets say the system is a long deformable object, on which I can apply forces). It can be described by Cosserat Rod theory and discretized, by modelling it ...
the2second's user avatar
0 votes
1 answer
85 views

Computing discrete laplacian matrix for mesh fairing

I asked this question on the math stack exchange and got an answer, but I am just as utterly confused as before. My fundamental goal is to actually construct the matrix, that is, a series of steps I ...
Makogan's user avatar
  • 263
0 votes
0 answers
34 views

Constructing generalized Laplacian matrix?

I am staring intently at this paper by Botsch and Kobbelt. In particular, I want to make the matrix specified in equation 5. I am trying to understand the specific computations I must instruct a ...
Makogan's user avatar
  • 263
1 vote
0 answers
75 views

Solving perturbed Einstein Boltzmann equations using RK4

I'm trying to learn to numerically solve the perturbed Boltzmann-Einstein equations in cosmology using the RK4 method. These are the equations: $$\dot{\Theta}_{r,0}+k\Theta_{r,1}=-\dot{\Phi}$$ $$\dot{\...
hidenori's user avatar
3 votes
1 answer
191 views

First derivative central differences with reflecting boundary conditions

I have the following problem in 1-D: \begin{equation} \partial_t u(t,x) = v(x)\partial_x u(t,x) + \kappa(x) \partial_{xx} u(t,x),\,x\in\Omega;\quad \partial_{\nu}u(t,x) = 0, \,x\in\partial\Omega. \end{...
lightxbulb's user avatar
  • 1,271
0 votes
0 answers
58 views

Algorithm for 1-dimensional minimal surfaces

Consider a set of points. For simplicity, let's say that those are 2D points (although the problem works in higher dimensions as well). The goal is to find the minimum possible length of a connected 1-...
Relja Šegvić's user avatar
0 votes
0 answers
101 views

What is the difference between approximations of mixed derivative and how to implement it

currently I am solving 2D nonlinear second order differential equation containing mixed derivative. I started searching how to descretisize it and found two formulas for 4th order approximation. First ...
Andrew's user avatar
  • 31
1 vote
1 answer
258 views

Euler's Method for fast moving particle trajectory

I'm trying to figure out how a magnet affects the trajectory of a particle travelling near the speed of light downwards toward the ground. The equation for the force of the magnetic field is pretty ...
jasone's user avatar
  • 11
0 votes
1 answer
115 views

computing Lyapunov exponents numerically

I am trying to compute numerically the Lyapunov exponents of an ODE. I follow the method described in Parker, Chua "Practical Numerical Algorithms for Chaotic systems" There is also relevant ...
0x11111's user avatar
  • 101
0 votes
0 answers
37 views

Does a warning in solve_bvp mean that the solution has to be discarded?

I am trying to solve a nonlinear and discontinuous fourth order BVP using the solve_bvp function of SciPy. My equation is $y^{(4)}=cf(y)$, where $f(y)$ is a ...
aaquib's user avatar
  • 33
2 votes
2 answers
228 views

Solving IVP backward in time via python

I'm having difficulty solving an initial value problem (IVP) in Python backwards in time. The code is at the end of this post. First, please let me state my simplified problem. The forward IVP is ...
JesseJC's user avatar
  • 21
1 vote
1 answer
102 views

Isolating decaying solutions to nonlinear second-order ode

I need to solve a nonlinear ODE of the form $$ \frac{d^2 y}{dx^2} + \frac{1}{x}\frac{dy}{dx}-\frac{1}{x^2}\sin(y)\cos(y)+\frac{2}{\alpha}\frac{\sin^2(y)}{x}-\sin(y)=0 $$ numerically, subject to the ...
Ali Shakir's user avatar
1 vote
1 answer
174 views

How to solve coupled differential equations numerically?

I've just started a project, trying to do simulation of electrodynamics using the well-known Maxwell equations: $$ \nabla \cdot \mathbf E = \rho \\ \; \\ \nabla \cdot \mathbf B = 0 \\ \; \\ \nabla \...
Álvaro Rodrigo's user avatar
5 votes
2 answers
639 views

How do people know the classic Lorenz attractor is actually deterministically chaotic at infinite time?

Correct me if I am wrong, but I take it that people actually think the classic Lorenz system is fully characterized, i.e. we know what the attractor looks like and the various fractal dimensions of it,...
Axel Wang's user avatar
1 vote
1 answer
112 views

how to solve a coupled nonlinear partial differential equations(Boundary Value Problem)

So far, I have been looking into linear and nonlinear differential equations(Boundary value problem) that look like the following: $\frac{d^2 \theta}{dz^2} + \sin(\theta) = 0$ I am now familiar with ...
Hari Sam's user avatar
5 votes
1 answer
93 views

Prediction of sphere (i.e. roast) core temperature heated in an oven

The real-life problem Assume I put a spherical roast with initially constant temperature of start_temp=25 (°C) into an oven with ...
Dieter Menne's user avatar
1 vote
1 answer
61 views

Once Lyapunov exponents have converged, can they diverge again?

I know the strength of attraction for a single attractor might vary from place to place. Say, if I calculated the Lyapunov exponents for a small portion of the attractor and they have already ...
Axel Wang's user avatar
2 votes
2 answers
550 views

Problems solving 2D heat equation using physics-informed neural networks

I am trying to solve 2D heat equation using the physics-informed neural networks approach. The training loss is decreasing, but my final network outputs make no sense. I am using Python/Pytorch. 2D ...
Abdeldjalil Latrach's user avatar
0 votes
1 answer
99 views

finding weak form of nonlinear differential equation for FEM simulation

The following is the well-known nonlinear differential equation for director's distribution at static equilibrium in liquid crystal displays(LCD). I want to obtain weak form of the given differential ...
Hari Sam's user avatar
0 votes
0 answers
39 views

Energy potential involvign pressure and viscoscity?

Making a really long explanation short. I am looking for an energy density function for an incompressible isotropic fluid that involves both viscoscity and pressure. The reason is, there is a way to ...
Makogan's user avatar
  • 263
0 votes
0 answers
54 views

Solving a minimization problem without flattening inputs?

I am reading this paper on improving time steps for solving simulation problems: https://www.math.ucla.edu/~jteran/papers/GSSJT15.pdf The authors developed this energy function: $$E(x) = \frac{1}{2\...
Makogan's user avatar
  • 263
1 vote
3 answers
226 views

Partial derivatives for triangular meshes (in 3D)

A grid offers an obvious definition for the partial derivatives at a grid point, given $x$ the value of a point $p$ in an $n$ dimensional grid, the forward partial derivative that point for coordinate ...
Makogan's user avatar
  • 263
0 votes
0 answers
40 views

General dimensional solution to fast sweeping quadratic equation

I am reading Hongkai Zhao's paper The Fast Sweeping method. I have implemented the method in 2D and now I want to move onto 3D. However section 2.6 confuses me. The article says: But I have no idea ...
Makogan's user avatar
  • 263
1 vote
0 answers
38 views

How can i study stability for a new method that solves second degree non lineara differential equations?

I developed a new method to solve this equations $\frac{d{y}^{2}}{dx^{2}}=g(x,y,\frac{dy}{dx})$ for a general g(x,y,z), wich their solution is a function f(x)=y. Obviously you need $y(x_0)=y_0$ and $y'...
martín canullán's user avatar
0 votes
0 answers
74 views

Encountering blow-up when solving the one-way heat equation using Lax-Wendroff

This is my first time attempting to implement a finite difference method for a PDE in Python, and I am having a bit of trouble. The PDE I am trying to solve is as follows: $$ \begin{cases} ...
Leonidas's user avatar
  • 153
0 votes
1 answer
49 views

Why is the maximum potential energy greater than the maximum kinetic energy?

I was plotting the energy variation in a mass-spring system. If I define the initial conditions to be at maximum displacement from the origin, the potential energy is plotted correctly but kinetic ...
Belal Bahaa's user avatar
0 votes
0 answers
55 views

Numerical method for space fractional derivative in 1 dimension

I am very new to the subject of fractional derivatives which arise while characterizing the anomalous transport of passive scalar in turbulence. I have found an equation of the following form, to ...
Sayan's user avatar
  • 87
0 votes
1 answer
76 views

How to get a normalized gradient with FreeFem++?

I am trying to use FreeFem++ to solve the heat geodesics algorithm. The algorithm is: solve $\dot u = \Delta u$ at a specific time $t$. compute $X = \frac{\nabla u_t}{|\nabla u_t|}$ solve $\Delta\phi ...
Makogan's user avatar
  • 263
-1 votes
1 answer
122 views

Solving Transcendental equation involving special functions becoming nightmare any one can help?

Simply i want to solve for schrodinger equation for finite potential well problems in spherical coordinates. For case in which l=0 . It is simple but when l changes. The solution are spherical ...
LEO PHYSICS's user avatar
3 votes
1 answer
162 views

Numerical scheme for the level set equation that solves inverse mean curvature flow problems

I am considering the problem of simulating the evolution of an interface given as a curve in 2D (or surface in 3D) that evolves according to a velocity specified at the interface of the form: $$\vec{v}...
B0bby31's user avatar
  • 33
0 votes
1 answer
73 views

On solving a first order nonlinear differential equation

It all starts with this Cauchy problem: $$ \begin{cases} \sin(2x(t)) -\cos(3x'(t)) = x(t) + x'(t) \\ x(0) = 1 \\ \end{cases} \quad \quad \text{with} \; t \in [0,10]\,. $$ Not knowing which way to turn,...
Monster's user avatar
  • 103
2 votes
0 answers
61 views

Symplectic (or alike) integrator for system with Coulomb singularity and time-dependent potentials

I am trying to calculate classical trajectories for a single positive ion and a single electron inside an RF trap. Therefore, I am dealing with a two-body system that possesses: Coulomb potential ...
michalt's user avatar
  • 21
2 votes
0 answers
100 views

Scipy.root not converging even when provided with initial guesses very close to solution

I've made a previous question here and also in SO wondering why only the fsolve solver converges for the simple one dimensional unsteady conduction problem $$ \frac{\partial T}{\partial t} = \alpha \...
Klaus3's user avatar
  • 133
0 votes
2 answers
305 views

Why is this scipy.root code not converging?

I'm running a test problem to set up larger problems. Solving the simple unsteady heat equation via finite differences: $$ \frac{\partial T}{\partial t} = \alpha \frac{\partial^2T}{\partial x^2}$$ $\...
Klaus3's user avatar
  • 133
1 vote
0 answers
84 views

How to include zero flux boundary conditions?

I am trying to solve the following differential equation in the domain of $\theta \in [0, 2 \pi]$ using finite differences scheme: For $0< \theta \leq \pi$ \begin{align} \rho_i^{n+1}=\rho_i^{n}+D\...
Irbin B.'s user avatar
  • 111
1 vote
2 answers
194 views

C^1 continuous element for a triangle?

I am looking for an element for FEM that is piecewise $C^1$ continuous across triangles (i.e. $C^1$ continuous on the edge separating 2 triangles of the mesh). I have heard about the Bell element: ...
Makogan's user avatar
  • 263
0 votes
0 answers
81 views

It is possible to solve integro-differential equations using in Fenics?

I am interested in solve the following integro-differential equation: \begin{align} \frac{\partial{\rho(\theta, t)}}{\partial{t}} = D \frac{\partial{\rho(\theta, t)}}{\partial{\theta^2}} - \beta \...
Irbin B.'s user avatar
  • 111
0 votes
1 answer
139 views

FreeFEM++ converting equation into code

I am trying to solve the following problem nuemrically: $$u_t = \Delta u + \sin t$$ To that effect I scanned the documentation of FreeFEM, the closest example I can find to my problem is the Thermal ...
Makogan's user avatar
  • 263
1 vote
1 answer
65 views

Solving a boundary value problem with variable number of coupled equations

Let's assume the equation $$ \nabla^2u_n(\vec{r})+a_n(\vec{r})u_n(\vec{r})=\sum_{m=1}^{N}b_{nm}u_m(\vec{r}),\quad n=1,2,\dots,N,\quad \vec{r}\in\varOmega\tag{1}\label{eq1}, $$ is to be solved for $u_n$...
Masa's user avatar
  • 194
0 votes
0 answers
100 views

Pyton get fem solving simple 2D differential equation?

I need to solve the differential equation: $$u_t = \Delta u + \sin t$$ On a 2D domain with homogeneous Dirichlet boundary conditions. Tod o this I am trying to use the python package getfem. I am ...
Makogan's user avatar
  • 263
0 votes
1 answer
141 views

Solve 1st order ODE in using `scipy`

I've been trying to solve the following equation $$ y(t)=-A\cdot\frac{\mathrm{d} y}{\mathrm{d} t}+B\cdot\left(\frac{\mathrm{d} y}{\mathrm{d} t}\right)^{2}+C \\ y(t=0)=y_{0}\\ $$ where $A$, $B$, and $C$...
BackSpace42's user avatar

1
2 3 4 5