Questions tagged [differential-equations]

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

736 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
817 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 ...
10
votes
0answers
231 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 ...
10
votes
0answers
167 views

Workaround for DSolve in V 12 when it gives undefined as solution to 1D heat PDE?

Reported to WRI CASE: 4278450 Comparing the following, all done from clean kernel The strange thing is that V 12 can solve this same PDE without the assumptions ...
10
votes
0answers
571 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/...
9
votes
0answers
106 views

What does DSolve`DsolveLaplaceTransformDump` mean in solution of DSolve?

Reported to Wolfram with CASE number 4028951 on 11.3, ...
9
votes
0answers
310 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, ...
9
votes
0answers
496 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 ...
9
votes
0answers
3k views

Precision and accuracy in NDSolve and NMinimize

I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
8
votes
0answers
99 views

How to modify NDSolve`StateData 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 ...
8
votes
0answers
269 views

DEigenvalues and NDEigenvalues return different values

In the following example, DEigenvalues and NDEigenvalues return different results despite having identical arguments. Does anyone know why? (I use Mathematica 11.3) ...
8
votes
0answers
482 views

How to put 2 or 3 NeumannValue conditions?

I want to solve numerically the heat exchange of a fin in transient state and two-dimentional, here is my attempt but instead of put DirichletCondition on ...
7
votes
0answers
89 views

DSolve fails with four variables

How is that DSolve has no trouble solving this: DSolve[{ D[G[x1,x2,x3],x1]==0, D[G[x1,x2,x3],x2]==0, D[G[x1,x2,x3],x3]==0 },G[x1,x2,x3],{x1,x2,x3}] but it fails ...
7
votes
0answers
88 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 ...
7
votes
0answers
75 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. ...
7
votes
0answers
291 views

How to use periodic boundary conditions on the derivative of u[x,y,z]?

I have a structural mechanical problem, where i try to calculate the strain field in the modelled material. I simplified the problem in the following example: There is a material with two phases, ...
7
votes
0answers
383 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 ...
7
votes
0answers
97 views

Order of boundary condition inside DSolve matters?

Bug introduced in 11.1.1 or earlier. Consider the following example: ...
7
votes
0answers
419 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 ...
7
votes
0answers
74 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 ...
7
votes
0answers
274 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 ...
7
votes
0answers
229 views

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

Bug introduced in 5.2 or earlier and persisting through 12.0. I encountered this when trying to solve this problem with DSolve: ...
7
votes
0answers
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 ...
7
votes
0answers
2k views

Using NDSolve for Integro-Differential Equations

I have a fairly complicated set of coupled non-linear integro-differential equations that I am trying to solve using NDSolve. The equations are: $\dot{x}=\big|y(t)-x(t)\big|^{1/n}\left[\text{Sign}[y(...
6
votes
0answers
72 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 ...
6
votes
0answers
111 views

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

Bug introduced in 11.3 or earlier and persisting through 12.0 Report to WRI [CASE:4246236] This is using 11.3 on windows 10. This is a pde from Handbook of first order partial differential ...
6
votes
0answers
62 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 ...
6
votes
0answers
183 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 ...
6
votes
0answers
163 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 ...
6
votes
0answers
146 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. ...
6
votes
0answers
117 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,...
6
votes
0answers
174 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 ...
6
votes
0answers
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 ...
6
votes
0answers
134 views

Modify NDSolve`StateData (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 ...
5
votes
0answers
154 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 ...
5
votes
0answers
426 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{...
5
votes
0answers
87 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}. ...
5
votes
0answers
242 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 ...
5
votes
0answers
151 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 ...
5
votes
0answers
130 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 ...
5
votes
0answers
633 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 ...
5
votes
0answers
111 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 ...
5
votes
0answers
142 views

Error with DSolve

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-...
5
votes
1answer
710 views

Solve PDE with DiracDelta function

This question is related to Analytic solution of dynamic Euler–Bernoulli beam equation with compatibility condition. I think it is more appropriate to open another question on this topic. In the ...
5
votes
0answers
731 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 ...
5
votes
0answers
514 views

NDSolve PDE, not enough boundary condition?

The PDE that I want to solve is: $$ \frac{\partial f}{\partial t} + \frac{1}{m} \left( p_x \frac{\partial f}{\partial x} + p_y \frac{\partial f}{\partial y} + p_z \frac{\partial f}{\partial z} \right) ...
4
votes
0answers
61 views

ParametricNDSolveValue with SparseArrays

I want to solve large, sparse matrix systems with ParametricNDSolveValue and was hoping to use SparseArray to speed up the computation. However I find that ParametricNDSolveValue doesn't seem to work ...
4
votes
0answers
51 views

SystemException[“MemoryAllocationFailure”] with DSolve and using TimeConstrained

Report to WRI CASE:4238154 There is a similar question where SystemException["MemoryAllocationFailure"] is generated by DSolve ...
4
votes
0answers
41 views

DSolveValue gives a confusing result for a simple vector-valued equation

If we use DSolveValue on just about the simplest vector ODE I can think of, it gives the following result. ...
4
votes
0answers
112 views

DSolve, NDSolve with WhenEvent Give Incorrect Solution for Simple ODE

NDSolve Results On the course of addressing question 181974, I encountered the following problem. ...
4
votes
0answers
268 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 ...