# Questions tagged [differential-equations]

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

1,227 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1k views

### Solving Maxwell's Equations in Mathematica

For the sake of demonstration (for my students) and practice, I wanted to numerically calculate the electric and magnetic field (3D) for a sphere of uniform density moving slightly to the right and ...
1k views

### From where to learn finite element method?

Can anyone reccomend me a book or site for learning finite element method with mathematica, besides wolfram language official site, https://reference.wolfram.com/language/FEMDocumentation/tutorial/...
155 views

### How to modify NDSolveStateData without crashing the kernel?

Probably a hard question, but it's better to cry out loud. Reminded by Chris K, I noticed my fix function has been broken since v11.3. After some checking, I ...
• 52.8k
1k views

### DSolve returns an answer that is not a solution

Investigating DSolve misses a solution of a differential equation, I came across this odd behavior of DSolve. The following DSolve command returns an answer to the ...
• 217k
336 views

### DSolve breaks when the ordering of independent variables aren't proper?

Bug introduced in 3.0 or earlier and persisting through 12.0. I encountered this when trying to solve this problem with DSolve: ...
• 52.8k
651 views

### benchmark of Mathematica's FEM?

Does anyone have any numbers on how mathematica compares to other commercial (eg ANSYS) or free FEM softwares (eg. FreeFEM++, FEniCS, elmer)? If this is too vague say solving the diffusion equation in ...
• 2,561
5k views

### Precision and accuracy in NDSolve and NMinimize

I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
• 439
452 views

### Spurious Error Messages from NDSolve when Using WhenEvent with Time Delays

Bug introduced between versions 10.1 and 10.4, and resolved in 11.3. Using either 11.2 or 10.4 on Windows 10 (64 bit), I am unable to reproduce the answer by March to question 99576. Specifically, ...
• 58.4k
672 views

### Symbolic Weak Form

Usually I write the weak form by hand for my FEM code, but it's a little annoying and mechanic sometimes. So, I wonder, is there any way to generate the symbolic weak form in Mathematica? For ...
• 503
1k views

### Modelling Hysteresis with a Differential Equation

I want to implement the bulk ferromagnetic hysteresis model (mostly the Jiles-Atherton Model), see http://drum.lib.umd.edu/bitstream/1903/6043/1/PhD_99-1.pdf page 44 equation (30). The needed ...
• 263
223 views

• 529
154 views

### Higher order Laplacian flows

Given disjoint surfaces $q_i$ in 3D and their 1D boundary curves $\partial q_i = \gamma_i$, I seek a surface $p$ that joins the $q_i$, where $p \cup q_i$ forms a (piecewise) $C^k$ surface that ...
• 33k
518 views

### Solving ODE with assumption that solution is bounded at boundaries?

For a HW problem, this ODE had boundary conditions given that are not the normal boundary conditions, instead the problem says that solution $u(t)$ is bounded at the left and right ends of the domain. ...
• 110k
82 views

### why DSolve gives different looking solution when using u vs. u[x,t] in the call?

Should the answer by DSolve be different when calling it as DSolve[ode,u,{x,t}] vs. ...
• 110k
685 views

### Mathematica packages for numerically solving the Klein-Gordon and Dirac equations?

The book "Advanced Visual Quantum Mechanics" by Thaller includes Mathematica software packages for the numerical solution of the Klein-Gordon equation and the Dirac equation (subject to user-defined ...
• 1,665
247 views

### Spurious DSolve Solution

Bug introduced in 8.0.4 or earlier, persisting through 12.0. DSolve quickly returns solutions to the following PDE (which is the homogeneous portion of the PDE in ...
• 58.4k
77 views

### EventLocator in NDSolve seemingly hogs memory in Windows, but not Mac

I have written a function (ftest in my code) which does the following: Takes a vector {x,vx,vy} as input Numerically solves (with high precision) a specific system ...
349 views

### Applying method of dominant balance directly to an equation

The non-linear equation $y''(x) = \sin k x y$ for $k\in \mathbb R$ cannot be solved analytically to yield a closed form solution. However, by applying the method of dominant balance one may obtain ...
• 325
112 views

### GreenFunction for Helmholtz equation in arbitrary Rectangle region doesn't evaluate

Bug persists through V13.0.0 or later Here is a basic example found in the documentation of GreenFunction: ...
179 views

### System of coupled nonlinear pdes with FEM (magneto-hydrodynamic mass transfer)

EDIT 01 See end of post for an update. Original Question I'm trying to reproduce the magneto-hydrodynamic flow studied here using the nonlinear FEM functionality, and have been having trouble ...
• 3,900
85 views

### Why Mathematica gives this second solution to this first order linear PDE $w_t+3 t w_x=w$?

This is using V12 on windows 10. I was trying to verify my hand solution with Mathematica. DSolve gives two solutions instead of one, which I do not understand ...
• 110k
168 views

### Where is 1/0 coming from in this call to DSolve?

Bug introduced in 11.3 or earlier and persisting through 13.1 or later Report to WRI [CASE:4246236] This is using 11.3 on windows 10. This is a pde from Handbook of first order partial differential ...
• 110k
117 views

### Details of NDSolve calling LSODA

Inspired by my question regarding the computation time of NDSolve using the LSODA backend I was wondering how NDSolve is actually calling LSODA (what arguments are sent to LSODA), i.e. what are the ...
• 7,513
222 views

### DSolve Returns Incorrect Solutions for First-Order ODE

Bug introduced in 10.4 or earlier and persisting through 11.3. Reported to Wolfram Technical Support as CASE:4150361. Fifty-one DSolve questions on this site are ...
• 58.4k
268 views

### Using NDSolve on the Painlevé equations

In an earlier question of mine, I was looking for a way to handle certain kinds of singularities (poles) when using NDSolve. Michael E2's answer, which relied on ...
• 1,028
121 views

### Tricky ODE with strange B.C. NDSolve vs. DSolve

This is a tricky ODE. First order. $$y'(x)=y^2(x)-2 y(x)+1$$ This is easily solved by hand, since separable. But the trick is with the boundary conditions. It is $y(1)=1$. When solving it by hand,...
• 110k
910 views

### Alternatives to FiniteElement as Spatial Discretization Method for NDSolve

Finite Element Programming: [...] It is possible to skip this section and continue with the discretization stage and make use of the initialized data structures ...
• 6,923
2k views

### Numerically solving system of partial differential equation

I am trying to solve a system of partial differential equation with boundary conditions. But I got an error message saying NDSolve::icfail: Unable to find ...
135 views

### Modify NDSolveStateData (if possible)

I am trying to solve a PDE that needs to be scaled constantly (refer to this). @andre suggests I modify NDSolve`StateData. Now, the problem is, I'm not used to ...
• 1,189
97 views

### Does current Mathematica capability allow solving PDEs (e.g. reaction diffusion equation) over surface of a mesh or surfaces

I came across this nice paper (https://arxiv.org/pdf/1605.01583.pdf) where the authors simulated a reaction diffusion system over the surface of a gecko, primarily to understand how various patterns ...
• 8,538
154 views

### DSolve returns wrong result

I tried to solve a nonlinear, partial differential equation for the function Y[h, x] by using the following code: ...
• 151
119 views

### Is there a Mathematica CUDA ode solver?

I have a system of ODEs which I'd like to solve with many (thousands) different initial conditions. In the net there are articles that CUDA can speed up such computations, but I haven't found ...
• 2,443
202 views

### Incorrect result by DSolve

For real $x$ consider the trivial equation $$|y'(x)|=-|x|.$$ Since the left side is always positive and the right always negative, there is no solution. Let's try ...
• 1,005
249 views

### Help implementing Magnus Expansion

The Magnus expansion is a tool to approximate solutions to first-order linear differential equations (the Wikipedia page is quite instructive and concise) - it's particularly useful because all orders ...
• 821
175 views

### StiffSystem or Singularity - a system of second order ODEs in the problem of geodesics

I would be extremely grateful for any help regarding the following code I wrote and the errors it produces. In this code I am investigating the behaviour of a massive particle trapped in the vicinity ...
• 151
308 views

### Spectral problem for differential vector operator (calculation of EM field in a cavity)

I know that mathematica has a DEigensystem and NDEigensystem which allow one to find eigenfunction and ...
• 205
517 views

### Convergence of approximate solutions to obstacle problem for the heat equation

Consider the problem (P) \qquad \begin{cases} \min\{\partial_t u - \Delta u, u -\varphi \} = 0 & \text{ in } (0,T)\times \mathbb{R}^N \\ u(0,\cdot) = \varphi(0,\cdot) & \text{ in } \mathbb{...
190 views

### Change Branch Cut for DifferentialRoot

The differential equation eqn = (16 + q) g[q] + 4 q (-3 + q^2) g'[q] - 4 q^2 (-1 + q^2) g''[q] == 0 is singular at {-1,0,1}. ...
• 58.4k
334 views

### what are the limitation on current Mathematica's ability to solving a Sturm-Liouville ODE?

Update fyi. CASE:3855831 (thanks to bbgodfrey reporting it) Mathematica 11 is supposed to be able to solve basic S-L ODE according to this page And it works ...
• 110k
182 views

### APPCRASH of Kernel.exe. running Murphy ODE collection

Since I am getting many KERNEL crashes running Murphy ODE collection, I thought to use this post and collect each crash here instead of making separate post for each one, as there might be too many ...
• 110k
136 views

### 1/0 encountured solving Murphy ODE #116

This is another case of DSolve getting 1/0 internally. Could someone explain why this happens? Is this a bug? does it happen on other platforms? I am using windows 7, 64 bit. This is a non-linear ...
• 110k
964 views

### Solving a system of differential algebraic equations (DAE)

I am trying to solve a system of 8 differential algebraic equations, where equations 3 and 5 are differential equations and the rest are constraints which need to be satisfied. Also I only know the ...
• 51
189 views

### Naive question on ODE numerical solving and periodic initial conditions

I have a second-order nonlinear ODE for which I would like to find a numerical solution, with periodic initial (boundary) conditions. Can this be done directly with ...
• 686
120 views

### unhandled win32 exception in WolframKernel.exe in DSolve of non-linear ODE in one variable

Bug persisting through 10.4. (windows 7, 64 bit) Installed 10.3.1 and started to run some old ode's. in V 9, this ode used to return unsolved, which is ok, but in 10.3.1 now the kernel crashes. This ...
• 110k
I am trying to solve the following partial differential equation for the function $f(x,y,z)$ \$\frac{(\alpha -\beta y)}{1-y^2}\left(\frac{\partial f}{\partial x} + \frac{(\alpha y-\beta ) }{\sqrt{1-...