Questions tagged [differential-equations]
Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.
8,004 questions
-2
votes
0
answers
73
views
Why iteration fails? [closed]
I'm solving this ODE and it seems that the first iteration (urho[1]) works but when I try to calculate urho[2] it fails. The ...
3
votes
2
answers
216
views
Solving a coupled 2nd order differential equation numerically using NDSolve
I would like to solve the following system of differential equations numerically for two one-dimensional functions $R(x)$ and $\phi(x)$:
\begin{eqnarray}
c_1 \left(R''(x) - (\phi'(x))^2 R(x) \right) - ...
2
votes
0
answers
60
views
how to improve the predictor corrector schemes including computational cost
I am currently implementing a variable-order fractional predictor–corrector scheme in Mathematica. Since I am still a beginner with Mathematica programming, I encountered several issues during the ...
0
votes
1
answer
92
views
NDSolve options for increasing precision near boundaries for "stiff" integration
I'm trying to estimate the solutions u[x,t] to a backward diffusion equation PDE using NDSolve (note - I need the time-dependent solution, as I already have solutions to the equilibrium case where the ...
1
vote
1
answer
164
views
0
votes
0
answers
66
views
The heat conduction equation of solar cells can't be solved [duplicate]
The heat conduction equation of solar cells can't be solved. NDSolveValue::ndnum: Encountered non-numerical value for a derivative at x == 0. ...
3
votes
1
answer
183
views
Mathematica ODE question
I am trying to solve an iterative matrix ODE of the form $f_k'(x)=T.f_k(x)+B(x)*S.f_{k-1}(x)$, where f is an $n$ dimension column, T and S are $n \times n$ matrices, and $B(x)$ is a function. The ...
0
votes
0
answers
70
views
Verify a first integral of a complicated ODE symbolically
I have an ODE of the form:
y^{(4)}[x]==F[y^{(3)}[x],y''[x],y'[x],y[x]]
for some complicated (but explicit) $F$ -- the exact form isn't really relevant to the ...
6
votes
1
answer
233
views
Is it valid for DSolve to return Indeterminate as a solution to a differential equation?
In V 14.3
Quit[]
ode=2*y[x]*D[y[x],{x,2}]==1+D[y[x],x]^2;
DSolve[ode,y[x],x,IncludeSingularSolutions->True]
Gives
Is it valid for DSolve to return ...
3
votes
2
answers
249
views
How to obtain this book solution for first order ode. Initial condition at infinity
This is problem 150, page 54, Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983.
...
0
votes
1
answer
111
views
Is it possible to find eigenvectors of matrix $f(1)$ in the given code analytically in terms of the variable $y$?
I have this differential matrix equation f'[x] == {{2 x, y + 5 I}, {-3 I + 2 y, Sin[3 x] - 5 y}}.f[x] for f[x] with the initial ...
0
votes
1
answer
82
views
ParametricNDSolveValue Doesn't Work
I am plotting particle trajectory using ParametricNDSolveValue, but it gives error. Any help is highly appreciated.
...
0
votes
0
answers
144
views
Oblique derivative boundary conditions in FEM
In one of my tasks, it is necessary to set a boundary condition in the form of an oblique derivative for the two-dimensional Laplace equation.
Do you know how this can be done in Wolfram Mathematics? ...
2
votes
1
answer
118
views
Machine number overflow when solving a PDE system
Recently I asked a question on solving a system of 3 nonlinear PDE (To solve a system of 3 nonlinear PDE). Now I transitioned to the next step, that is, a realistic PDE which has been my initial aim:
<...
2
votes
0
answers
74
views
Event is not triggered in NDSolve
I'm solving an ODE system with multiple events and find the discrete variable not updated as expected because one of the events is not triggered. During narrowing down the problem, I find something ...
9
votes
3
answers
405
views
To solve a system of 3 nonlinear PDE
I am trying to solve a system of 3 nonlinear partial differential equations:
...
10
votes
3
answers
462
views
How to make DSolve obtain this solution to this IVP first order ODE?
V 14.3 can not solve this IVP(Initial value problem) first order ode from textbook
...
2
votes
3
answers
248
views
Heat equation with b.c. at $+\infty$ and i.c. at $-\infty$
I am wondering what is the best way to solve numerically a initial-boundary value problem of heat equation like this (surely I've made a lot of mistakes in the code):
...
2
votes
1
answer
151
views
Minimising integral of solution found by solving ODE
I am interested in solving a problem that takes the following form. I solve, using some numerical method such as RK4, an ODE of the form
$$
r(v)L(v;\{a_i\})+r^{\prime\prime}(v)=0\,,
$$
where $L(v;\{...
5
votes
2
answers
314
views
NDSolve exceedingly slow
I the following ODE with parameters
\begin{align}
B_e\: \theta''(s)+2(s-1)\cos\theta(s)=S_e\: f\left(\theta(s)\right),
\end{align}
with $0\leq s\leq 1$ and
\begin{align}
\theta(0)=0\:\:\:\text{and}\:\:...
1
vote
1
answer
145
views
Why DSolve gives solution to $y'=0$ with IC $y(0)=t$ as $y=t$?
I was trying to see if I can trick DSolve for the ode $y'=0$ which has solution $y=c_1$, so all solutions are constant lines (horizontal lines).
But then I asked it ...
5
votes
1
answer
367
views
How to determine if ode is linear or not in Mathematica?
Mathematica does not have builtin function to determine if ode is linear or not.
Currently I use the code below, but it can give false negative. For example, the ode $\frac{1}{y'(x)} = x$ is linear ...
0
votes
0
answers
81
views
Numerical state in NDSolve
Is there a way to use NDSolve when you don't have a symbolic expression for the time derivative? I can't figure out a way to get access to the numerical state.
The ...
5
votes
1
answer
334
views
DSolve returns only trivial solution for $t y' = 3y$
WRI CASE:5291279
The textbook says that the differential equation
\begin{align*}
t y' &= 3 y\\
y(0) &= 0
\end{align*}
has a solution $y= c_1 t^3$ for any $c_1$....
5
votes
2
answers
434
views
Find asymptotic values of ODE solution
I study the various curves obtained with Frenet-Serret equations,
using this code:
...
0
votes
1
answer
75
views
Defining a function from the results of WhenEvent in ParametricNDSolveValue
I want to solve a differential equation x'[t]=f{x[t],k] numerically, where k is a parameter. One I have the solution x[t,k], I want to obtain the time t0[k] for which some event (say x[t0[k],k]=0) and ...
1
vote
1
answer
240
views
Advice on solving system of ODEs
The system of equations is as follows:
ub'[x] == I m/x ub[x] + I (1 + (2 xi)/x) vb[x];
...
3
votes
0
answers
125
views
Why solution to this ode satisfies the IC but not the ode itself?
Reported: [CASE:5287941] DSolve gives wrong solution. V 14.3
Using V 14.3, why DSolve gives solution $y=0$ which satisfies the IC given, but not the ode itself?
...
2
votes
1
answer
172
views
Solving non-linear dependent PDEs by discretization
I am trying to solve a system of three coupled PDEs in Mathematica: eqT, eqX and eqZ
...
2
votes
0
answers
84
views
NDSolve vector function with various initial conditions [closed]
Consider the following ODE:
...
1
vote
1
answer
156
views
NDSolve succeeds in Version 14.0.0.0, but later versions and renaming variables yields Power::infy
Main Question:
Why does NDSolve fail with Power::infy in Versions 14.3.0.0, 14.2.1.0, and 14.2.0.0,
yet succeeds in Version 14.0.0.0?
More troubling, why does NDSolve fail with Power::infy in Version ...
0
votes
0
answers
103
views
DSolve generated complex solution for my second order nonhomogeneous ODE
For 1 <= x < Infinity, 0 <= t <= 1, I expected to obtain real solution g[t, x] from the second order ODE=Q (see definition below). But the perticular solution I got is complex: g[0.68,1....
0
votes
1
answer
89
views
DSolve throws overdetermined error for large (but simple) system of ODEs
I have the following example, which is a proxy for the more complex problem I am trying to solve.(Apologies that the LaTeX is explicit, for some reason it trips the code formatting error on ...
4
votes
2
answers
155
views
Using NDSolve when bounds of independent variable are uncertain (unknown)
Here we have code that uses WhenEvent[x[t] + y[t] == # & /@ {0.25, 0.5, 0.75} // Evaluate for three different events.
...
5
votes
2
answers
275
views
Extract information from NDSolve during evaluation
I want to find for which t any of these holds: x[t] + y[t] == 0.25, x[t] + y[t] == 0.5, <...
1
vote
0
answers
81
views
Numerical inconsistency between two Interaction Pictures in NDSolveValue
I'm solving for a quantum system's evolution operator $U_S(t)$ using two different Interaction Pictures.
The physical evolution is described by the Schrodinger equation for the evolution operator $U(t)...
10
votes
4
answers
831
views
How to draw isothermal (conformal) grids on Plot3D/ParametricPlot3D?
According to the isothermal coordinate theorem, there are isothermal coordinates on any two-dimensional manifold:
isothermal coordinates exist around any point on a two dimensional Riemannian ...
4
votes
1
answer
155
views
Non linear GPE With Imaginary Current Nonlinearity
I want to solve the Equation 22 and generate fig 3(a) given in the paper https://arxiv.org/pdf/1812.04672.
...
0
votes
0
answers
76
views
How to Solve PDE using Inactive Form
I am trying to solve this PDE using the inactive form, however I ran into error stating that the: The PDE coefficient 0....
10
votes
2
answers
446
views
Mesh Rectangle with a fixed inner Line
In this simple example I try to mesh a rectangle, the mesh should include a fixed line.
Using "IncludePoints" I get
...
0
votes
0
answers
111
views
PDE in inactive form
I am trying to solve this complex PDE, however I am getting an error from Mathematica stating: The maximum derivative order of the nonlinear PDE coefficients for the Finite Element Method is larger ...
2
votes
1
answer
176
views
How to use Mathematica find second order partial derivatives related to Laplace equation? [duplicate]
In 2D polar coordinates, let $u=u(r,\theta)$. Using Mathematica, I want the second-order partial derivative as shown below.
Mathematica may have built-in rules to find the Laplacian and Cartesian to ...
2
votes
0
answers
67
views
Handling "Bifurcations" within NDSolve. Is there a more robust method?
I am trying to track the points where two functions intersect as the system of differential equations evolves. The challenge arises when the functions move from not intersecting to being tangent at a ...
0
votes
0
answers
74
views
Finding Hopf bifurcations by minimizing distance of eigenvalues to the imaginary axis
It would be nice to find Hopf bifurcations in Mathematica by minimizing distance of eigenvalues to the imaginary axis. Since I always start from a stable fixed point, it suffices to NMaximize the ...
0
votes
0
answers
95
views
How can I plot bifurcation diagrams given these isoclines?
I have the following system:
\begin{equation}
\begin{aligned}
\frac{dT}{dt} &= \frac{1}{\lambda} \Bigl(-a T^4 + b\big[1-(s_1 - s_0)e^{-\alpha_1 u}-s_0\big] \Bigr), \quad (1)\\[1ex]
\frac{du}{dt} &...
0
votes
1
answer
89
views
NDSolve using table
I have the following code that works well.
...
5
votes
1
answer
342
views
Solving Poisson's Equation Numerically
I'm trying to numerically solve Poisson's equation for the following scenario:
The potential inside a cylinder of radius R=1 and height H=2 with uniform charge density(which I'll set to 1).
Poisson's ...
0
votes
0
answers
88
views
Unexpected linear decay in gravitational waveform amplitude using NDSolve—how to fix?
I'm solving the Regge–Wheeler equation in Schwarzschild spacetime
D[u[t, x], {t, 2}] + Vsx[x]*u[t, x] == D[u[t, x], {x, 2}],
with the potential
...
0
votes
0
answers
68
views
While solving set of differential equations with NDSolve, I got NDSolve::initf: The initialization of the method NDSolve`StateSpace failed
Now I'm trying to solve partial differential equation by discretizing spatial coordinate. These equations are a kind of fluid equation and the fluid is annihilated at the x=0.
The variables are matter ...
2
votes
4
answers
201
views
Using NDSolve to solve three coupled ODEs
I am trying in this code to solve three non-linear ODEs together, and I want to plot the three functions as functions of η.
Why does my code not work?
...