Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [differential-equations]

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

11
votes
0answers
720 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 ...
9
votes
0answers
94 views

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

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

Solving a system of temporal non-linear (reaction-diffusion) PDEs over a region using Neumann conditions

I am trying to solve a system of PDEs with non-linear terms: $\frac{\partial a(x,y,z,t)}{\partial t}=\color{red}{-\text{$\tau_2 $ } a(x,y,z,t) h(x,y,z,t)}+\text{$\tau_1 $ } d(x,y,z,t) \\\frac{\...
9
votes
0answers
443 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
2k 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
210 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/...
8
votes
0answers
390 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
73 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
237 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
78 views

Weird behaviour in `WhenEvent`

Consider the following code (taken from question 158857): ...
7
votes
0answers
92 views

Order of boundary condition inside DSolve matters?

Bug introduced in 11.1.1 or earlier. Consider the following example: ...
7
votes
0answers
72 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
239 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
201 views

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

Bug introduced in 5.2 or earlier and persisting through 11.0.1. I encountered this when trying to solve this problem with DSolve: ...
7
votes
0answers
975 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
70 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 ...
6
votes
0answers
146 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
86 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
200 views

How to improve precision of finding the eigenfunction for this 2D Schrödinger equation?

I'm trying to solve a 2D Schrödinger equation with the following potential: ...
6
votes
0answers
114 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
333 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 ...
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
129 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
48 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 ...
5
votes
0answers
131 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 projective geometry was the most ...
5
votes
0answers
405 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
306 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 ...
5
votes
0answers
68 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
198 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
145 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
121 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
138 views

Spurious DSolve Solution

Bug introduced in 8.0.4 or earlier, persisting through 11.3 DSolve quickly returns solutions to the following PDE (which is the homogeneous portion of the PDE in ...
5
votes
0answers
533 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
109 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
137 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
0answers
641 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 ...
4
votes
0answers
34 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
98 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
176 views

Solver for unsteady flow with the use of the Navier-Stokes and Mathematica FEM

There are many commercial and open code for solving the problems of unsteady flows. We are interested in the possibility of solving these problems using Mathematica FEM. Previously proposed solvers ...
4
votes
0answers
259 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 ...
4
votes
0answers
143 views

How to find an exact solution to this ODE?

I am trying to find an exact solution to this differential equation, ode = f'''[x] + f[x]*f''[x] - f'[x]^2 == 0 For which, I already know the exact solution ...
4
votes
0answers
153 views

Why is this non-vectorized NDSolve faster than vectorized?

I'm trying to get a feeling for stochastic population models. A simple starting place is a birth-death process whose deterministic limit is the logistic equation. The idea is to model the probability <...
4
votes
0answers
141 views

Laplace equation in square region

Suppose we have square region with side $l$ and rectangular with sides $l$ and $l+e$, $e=0.001$. ...
4
votes
0answers
185 views

Lyapunov Exponent from time series data for delay differential equation

If I have 2000 data points for the following equation ,How to find out the Lyapunov exponent for different values of [Tau] .This is a delay differential equation i.e infinite dimensional system. <...
4
votes
0answers
127 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 ...
4
votes
0answers
122 views

NDsolve memory leak

Every time I run NDsolve it uses some memory that I am not able to free later. The following is an example code based on the spring equation (Hooke's law) that ...
4
votes
0answers
166 views

new kernel crashes using DSolve in 10.3.1

Update: I added small movie showing the crash, since others who tried it so far could not reproduce it on their system. Original question I am finding new problems with ...
4
votes
0answers
148 views

Avoid Evaluation of Function at NDSolve

I have a huge "black-box" f function, which I want to integrate. Let's define it: f[x_,y_,a_]:=a*Exp[-(a*10000)(x^3+y^3)] as ...