Questions tagged [differential-equations]

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

847 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
861 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 ...
11
votes
0answers
305 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: ...
10
votes
0answers
357 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
179 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
800 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/...
10
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 ...
9
votes
0answers
110 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 ...
9
votes
0answers
111 views

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

Reported to Wolfram with CASE number 4028951 on 11.3, ...
9
votes
0answers
346 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
523 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 ...
8
votes
0answers
281 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
499 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 ...
8
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(...
7
votes
0answers
54 views

What's the solver behind Method -> {“EquationSimplification” -> “MassMatrix”}

Related: What's behind Method -> {“EquationSimplification” -> “Residual”} By reading the document carefully, I've learnt that there are 3 possible options in "EquationSimplification" for DAE systems: ...
7
votes
0answers
96 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
101 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
78 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
451 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
102 views

Order of boundary condition inside DSolve matters?

Bug introduced in 11.1.1 or earlier. Consider the following example: ...
7
votes
0answers
457 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
75 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
294 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
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 ...
6
votes
0answers
74 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
114 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
70 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
199 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
183 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
245 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
176 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
158 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
444 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
92 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
273 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
162 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
134 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
700 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
155 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
806 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
779 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
519 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
67 views

1-D stress (displacement) analysis in annulus by considering viscoelasticity

I am a new Mathematica user, and I was trying to solve a stress (or displacement) field problem in an annulus. Here is the problem in the polar coordinate: The inner radius of the annulus is $b$, ...
4
votes
0answers
65 views

Strange behavior of WhenEvent, a bug?

I really feel sorry that I have asked too many questions on this forum about DAE. But I'm indeed facing a lot of problems on this topic and NDSolve. Once again I ...
4
votes
0answers
39 views

NDSolve`ProcessEquations inside Manipulate

NDSolve and NDSolve`ProcessEquations can handle equations with vectors on each side like this one: ...
4
votes
0answers
84 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 ...
4
votes
0answers
65 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 ...

1
2 3 4 5
17