Questions tagged [differential-equations]

Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.

1,063 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
2answers
132 views

Speed up a differential equation solution + parameter integration + parameter maximization

The problem I am trying to solve can be described as a maximization of an integral of the solution of a differential equation. A MWE is ...
2
votes
0answers
53 views

Problem with stopping NDSolve after a condition is met

I'm trying to write a piece of Mathematica code that is essentially a differential equation solver that needs to take a specified function $V[t,q]$, and then numerically solves the differential ...
2
votes
0answers
60 views

Code to find the Covariant Lyapunov Vectors

I've been able to find a decent amount of existing resources for computing the Lyapunov Exponents for a system of differential equations. Is there any existing code/resources for computing the ...
2
votes
0answers
165 views

Solving a Modified Biharmonic Equation on a Square

I am seeking to solve the differential equation \begin{equation} \left[\partial_{\overline{x}}^{4}+2\left(1+\delta\right)\partial_{\overline{x}}^{2}\partial_{\overline{y}}^{2}+\partial_{\overline{y}}^{...
2
votes
0answers
63 views

DSolve[] and initial conditions

Take some simple function of 2 variables, e.g. f[x_,y_] := x+y and try to solve a PDE of it for the general solution: ...
2
votes
0answers
43 views

Is this the expected EvaluationMonitor behavior with NDSolve with Method->“SymplecticPartitionedRungeKutta”

It appears that EvaluationMonitor is not being called as expected, but only when I am using SymplecticPartitionedRungeKutta. Here is a stripped down example to illustrate. Forces in Hamilton's ...
2
votes
0answers
101 views

How do I create a piecewise function using Do[] or While[]?

The following non-linear circuit is an uncontrolled three-phase full-wave 6-pulse rectifier. The inputs are $v_{an}(t) = V_m \sin (\omega t)$, $v_{bn}(t) = V_m \sin (\omega t-120°)$ and $v_{cn}(t) = ...
2
votes
0answers
98 views

ToothPasteSurface 2nd order non-linear pde

By pinching a flexible cylinder at intervals its cross section gradually transitions from a circle to a straight line resulting in a shape like: ...
2
votes
0answers
72 views

NDSolve very slow

I am trying to run this code to get the output from NDSolve for 4 dynamical equations. However, I have two issues: (1) It is taking a very long time (can reach ...
2
votes
0answers
115 views

Solving Ultrahyperbolic Equation (4D) With NDSolveValue

So we were trying to solve the Ultrahyperbolic Equation with two spatial dimensions and two time dimensions in Mathematica using NDSolveValue. We understand that the problem, in general, is not ...
2
votes
0answers
103 views

How can I improve the speed of computing of numerical integration and eigenvalue?

First, let me explain what I am calculating. I have the following 2D-equation: $$ w(x,y) = \sum_{m}^{M}\sum_{n}^{N}A_{mn}\sin\left(\frac{2m\pi x}{a}\right)\sin\left(\frac{2n\pi y}{b}\right) $$ ...
2
votes
0answers
71 views

NDSolve causing my PC to crash

I'm trying to integrate a complicated Fokker-Planck PDE $\frac{dP}{\partial L}(L,g,h,q) = \frac{A_3^2}{2}q^2\frac{\partial^2P}{\partial g^2}+A_3^2gq\frac{\partial^2P}{\partial g\partial q} + (A_1^2+...
2
votes
0answers
92 views

Quasi-periodic boundary conditions

I am trying to solve the following problem using Mathematica's NDSolve $$ \partial^2_{y}\psi+\partial^2_{x}\psi-2\,i\,q\,B\,y\,\partial_{y}\psi-q^2B^2y^2\psi+q\,B\,\psi=0 $$ subject to the boundary ...
2
votes
0answers
68 views
2
votes
0answers
73 views

NBodySimulation: custom pairwise potential

I'm trying to define a Lennard-Jones potential in 2D for NBodySimulation ...
2
votes
0answers
53 views

Computing the first eigenfunction of the p-Laplacian in a real interval

How can I numerically compute the first (non-negative) eigenfunction $u$ of the $p$-Laplacian ($p>1$) in a bounded interval $(-a,a) \subset \mathbb R$ (up to positive multiplicative constant)? $$-\...
2
votes
0answers
235 views

Kernel crash after repeated use of NDSolve

I am trying to solve the Einstein-Klein-Gordon system (equations below) for different piecewise potentials but the kernel keeps crashing after repeated use of NDSolve. Apparently, everything works ...
2
votes
0answers
77 views

Large system of implicit differential equations

We are trying to solve a large system of implicit system of differential equations for complex variables $\boldsymbol{\alpha}\left(t\right)$ and $\boldsymbol{\lambda}\left(t\right)$. System consists ...
2
votes
0answers
43 views

Kernel shutting down with no error message in Linux while it does not happen in Windows

When I run the code to solve ordinary differential equations using NDSolve, the code is stopped with no error message in Linux while it does not happen in Window. Specifically, the code solves the ...
2
votes
0answers
200 views

Model 1D Vlasov Equation

Vlasov Equation The non-relativistic form of the Vlasov equation is given by: $$ \partial_{t} f\left( \mathbf{x}, \mathbf{v}, t \right) + \mathbf{v} \cdot \nabla f\left( \mathbf{x}, \mathbf{v}, t \...
2
votes
0answers
523 views

NDSolve and DSolve solutions

Sorry for this probably trivial question, but I'm at a loss with this simple problem and the way Mathematica handles it. It's about a free-falling object, dropped by a height of 10, starting with zero ...
2
votes
0answers
118 views

Phase portrait of n-dimensional state-space system

It is usually not difficult to study the state space for n = 2,3 variable states. What if these variables are more than 3, for example 4,5 or 6? There is a rule according to which the dynamic features ...
2
votes
0answers
153 views

How to get the NDSolve to seek only a real solution?

I use NDSolve to solve system of 2 ODE of 1st order: ...
2
votes
0answers
203 views

Solving for a minimum action path in mathematica

I am interested in computing a quantity that is mathematically defined as follows, $$\phi(x_1,x_2) = \inf_{T>0} \inf_{\gamma \in C^{x_2}_{x_1 }(0,T)} \int_{0}^T L(\gamma, \dot{\gamma})\mathrm{d}t$$...
2
votes
0answers
111 views

Nonlinear, second order system of ODEs not solved by Mathematica, solution however exists

I am currently working on solving a system of two coupled nonlinear second order ODEs. I have already shown by hand, that 2 real solutions, as polynomials of second order, exist but I want to use ...
2
votes
0answers
65 views

Is Inactive Form avoidable when using NDSolve for non-linear ODEs

So this is basically the same question as here referring to information provided here. However, I am wondering if this inactive form is always necessary or more of a convenience. For example, ...
2
votes
0answers
127 views

Solar System N body Simulation

This is an N-Body simulation for the Sun and the following planetary bodies: Mercury, Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune and Pluto. Initial Parameters ...
2
votes
0answers
60 views

Speeding up the process of NDSolve[] when a user-defined function is involved?

I am trying to tackle a (1+4 dimensional PDE) model at which the solution of the first PDE (with some interpolations and changing the domain) would be used in the second PDE. In fact, I must choose ...
2
votes
0answers
117 views

RK4 of second order ODEs system

I'm new here and I have to program explicitly a Runge-Kutta 4 Method for a second order ODEs $10 \times 10$ system: $X''(t)=AX(t)+F(t)$, and the instruction was to make a change of variable $y(t)=x'(t)...
2
votes
0answers
79 views

Solving 2D Integro-Differential equation numerically

The following problem was given to me by a friend, so I can't really guaranty that a solution exists, but if, I certainly can't find it myself... Let us consider the following Integro-differential ...
2
votes
0answers
38 views

DSolve 4 variables function error

Mathematica version: 12.0.0.0 I'm trying to solve 2 basic differential equations; ...
2
votes
0answers
108 views

NDSolve 3D Poisson PDE (cylindrical coordinates)

I try to model the threedimensional heating problem of a flat cylinder which is heated along the circumference and cooled along the face side. The temperature ...
2
votes
0answers
76 views

Error in PDE: Length of Derivative operator

I am trying to solve Poisson's equation in a cylinder with Dirichlet boundary conditions for the top, bottom, and sides of the cylinder, but I am getting the following error from NDSolve: ...
2
votes
0answers
222 views

Non constant coefficient in heat equation

I have to solve the following heat equation over a cylindrical domain. In cylindrical coordinates the PDE Equation reads: ...
2
votes
0answers
130 views

How to impose a “boundary” condition inside a computing domain?

I need to set a "boundary" condition not at the boundaries of the computing domain but inside the domain during solving an ODE with FDM. The problem is a boundary value problem, which has been ...
2
votes
0answers
116 views

NBodySimulation

My question is about new NBodySimulation package in version 12. I figured out how to customize the basic functions "PairwisePotential", "PairwiseForce","ExternalPotetial"... The next unresolved issue ...
2
votes
0answers
99 views

Formulating equations for 3D stress in the finite element method

I would like to know how you formulate equations for the finite element method for stress calculations. We know the answer because user21 has put it here. It involves usage of ...
2
votes
0answers
140 views

Mathematica running out of RAM while executing NDSolve

I am playing with Mathematica to solve the 2D-wave equation with the code below: ...
2
votes
0answers
68 views

Using NDSolve to solve not quite Stefan-like problem

I'm trying to solve a moving boundary PDE for a function $u(x,t)$ between $x=0$ and $x=s(t)$. The PDE is $$ \partial_t u= u^2 \partial_x^2 u - \frac{\zeta}{2} x^3 \partial_x (u/x^2)$$ (1) with ...
2
votes
0answers
75 views

What is the default method used by ParametricNDSolve for a boundary value problem?

What is the default method in ParametricNDSolve for a boundary value problem: parsol = ParametricNDSolveValue[ ... ] How do I ...
2
votes
0answers
164 views

Asymptotes of parabolic cylinder differential equations with boundaries at infinity

For context, I'm studying the paper Coulomb blockade in superconducting quantum point contacts by Averin from 1998. Specifically, I am trying to find how he obtains equation 11 from equation 10, which ...
2
votes
0answers
87 views

Solving a PDE solved by the method of lines giving a warning about bad local spatial error estimate

I use the method of lines to solve the PDE ...
2
votes
0answers
85 views

Plot ContourPlot2D of PDE that depend of time over a set of image slices

A few days ago i made a publication asking about of projecing ContourPlot3D onto 2D slices (Project ContourPlot3D onto 2D slices. It is possible?), but i think i did not explain myself very well. I'm ...
2
votes
0answers
99 views

How to use DirichletCondition with DSolve and not just NDSolveValue?

I know one can use Region and DirichletCondition with NDSolveValue. But I do not know why it ...
2
votes
2answers
280 views

Validating a solution for a differential equation with DiracDelta

For the following differential equation $\displaystyle-\frac{∂ ^2\phi2 (x)}{∂ x^2}+λ ~[\phi2 (x)]^3-\mu ^2~\phi2 (x)=\phi2(x)~δ(x)$ ...
2
votes
0answers
158 views

Computing quadratic differential trajectories with Mathematica

There was a question about a particular case of this, Quadratic differentials; seemingly it contained too little information, so let me try again. This will be also a second take on my previous ...
2
votes
0answers
598 views

How to Solve this Fokker-Planck Equation?

I need to solve this Fokker-Planck equation in Mathematica and my attempt to perform this integration is above: My first attempt is above: ...
2
votes
0answers
138 views

Initial condition trouble with NDSolve for a 2nd order PDE

In general, when solving a 2nd order PDE (such as the wave equation below) for $$u(x,t), \quad x \in(-\infty,\infty), \: t\in (0,\infty)$$ it should be sufficient to provide initial conditions $u(x,0)$...
2
votes
0answers
140 views

DSolve analytical solution of the system equation with two variable

I have a difficulty to solve this system equations: ...
2
votes
0answers
178 views

Solving a differential equation with an implicit function in NDSolve

I want to solve a differential equation in Mathematica using NDsolve, the differential equation is given by: $y(t)''+3H(t)y(t)'+\frac{\partial V(u(y))}{\partial y}=0$ where $H(t)$ is given by: $H=\...

1 2 3
4
5
22