Questions tagged [differential-equations]
Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.
7,409
questions
0
votes
0
answers
13
views
PDE with Excess Potential
I am trying to solve this PDE with excess potential and the code is shown below.
...
0
votes
0
answers
43
views
3
votes
1
answer
148
views
How to solve solve an ODE that depends on a strictly positive parameter?
To solve the ODE
f'' + f = 0 on (0, 1)
f(0) = f'(1) = 0.
I use the command
...
1
vote
0
answers
68
views
Heaviside function in NDSolve
I have:
...
1
vote
0
answers
85
views
FindRoot + NDSolve + List? [duplicate]
I've noticed that FindRoot fails when its argument involves a component of a list, to which a substitution rule from NDSolve has ...
0
votes
0
answers
38
views
In Plot, different x range shows different result. Is it a bug? [duplicate]
After ODE, plot within {t,0,50} and plot within {t,0,60} have quite different results at some time instants.
...
1
vote
0
answers
155
views
Bifurcation and stability analyses of delay differential equations
Are there any packages in Mathematica for bifurcation and stability analyses of delay differential equations? For Matlab, there is a nice tool like:
https://twr.cs.kuleuven.be/research/software/delay/...
1
vote
1
answer
115
views
Mathematica gives weird solution to $y=xy'+y'$ [closed]
So I am practicing solving differential equations using Mathematica, and I will usually get an answer that I can easily verify. (as in I solve the differential equations myself and then check with ...
3
votes
1
answer
118
views
NDSolve ignores my NeumannValue boundary conditions
I am trying to solve a simple linear differential equation for $f(x,y)$ on a square with area $L\times L =1$.
I consider
$(\partial_x^2 + \partial_y^2)f + \partial_x \partial_y f = 0$ with the ...
7
votes
2
answers
900
views
Numerically solving radial Schrödinger equation with Yukawa potential
I am trying to solve the radial Schrödinger equation using NDEigensystem but I am running into some issues. There are posts about doing this (see here for example), ...
0
votes
0
answers
48
views
ParametricNDSolveValue as replacement rule [closed]
I have a system of 4 non linear differential equations x[t],y[t],z[t],w[t]with one free parameter a solved with ...
2
votes
0
answers
67
views
Solving PDE for Diffusion Equation with Both Ideal and Excess Potential (Boundary Condition Issue)
I am trying to solve this partial diffusion equation shown
$$\dfrac{\partial C_A}{\partial t}=D_A\left[\dfrac{\partial^2C_A}{\partial r^2}+\dfrac2r\dfrac{\partial C_A}{\partial r}+\dfrac1{K_BT}\dfrac1{...
1
vote
0
answers
39
views
How to reverse-engineer model parameter which involves implicit function and integral? [closed]
I am solving a model which consists of 4 auxiliary equations (eqn2 to eqn5) and 2 main equations (...
0
votes
0
answers
57
views
1
vote
1
answer
57
views
How the function NDSolve works? [closed]
I am trying to numerically solve a system of ordinary differential equations.
...
2
votes
3
answers
176
views
DSolve returns "Inverse functions are being used by solve; so some solutions may not be found", but it seems it returns all results
Sometimes, DSolve would return
Inverse functions are being used by Solve, so some solutions may not be found
but it seems it has returned all results. For example,...
2
votes
1
answer
48
views
ParametricNDSolve doesn't correctly parse black-box function involving both independent variable and parameter
Consider this toy example:
f[t_?NumericQ, a_?NumericQ] := t + a
tst = ParametricNDSolveValue[{x'[t] == f[t, a], x[0] == 0}, x, {t, 0, 1}, {a}]
...
7
votes
2
answers
581
views
Convert MATLAB code solving 1D wave equation via FFT using ode45 into Mathematica code
I don't quite understand the process of solving differential equations by MATLAB. It seems that it doesn't need the explicit function to specify the required solution, but only needs to input the ...
0
votes
0
answers
27
views
Manual updating of function in Do loop
Previously I had asked a question about solving Maxwells equations with boundary conditions, here Machine overflow when defining boundary conditions.
I have managed to successfully run the code ...
1
vote
1
answer
303
views
Fitting delay differential equations (DDE)
I have the following differential equations:
$$S'(t) = 0.31 S(t) \Big( 1 - \frac{S(t)}{6.19} \Big)- \frac{a}{1 + B(t)} S(t),$$
$$B'(t) = c (1 - B(t)) - d B(t) S(t) - 3 c (1 - B(t - 18)),$$
where $B(t -...
1
vote
1
answer
86
views
Why is the result of "D[y == Log[x*y], x]" "0 == 1/x"? [closed]
In Mathematica 13.3.1, the D[y == Log[x*y], x] gives result 0 == 1/x. It is very weird. At WolframAlpha, its result is ...
1
vote
2
answers
130
views
Chi-square minimization error
I'm trying to fit some data into a model using the standard procedure of minimizing the chi-square function using this code:
...
2
votes
1
answer
107
views
Method of lines - Dirichlet and mixed BC
I have a dissolution problem to solve with two equations (everything is in dimensionless form - concentration, time and distance - EDIT: that came from the second Fick's law, where the distance was ...
1
vote
1
answer
111
views
Unable to improve accuracy of MethodOfLines
I'm studying a PDE which roughly models a rope subjected to driving on one end. The coordinate $v$ is related to physical time $t$ via the relation $v=t-x$. I'd like to solve the initial value problem ...
3
votes
2
answers
163
views
Badly conditioned matrix for boundary ODE
I have a coupled boundary ODE with dependent variables $u=u(x)$ and $z=z(x)$,
$$u'' - \frac{1}{z} \left( -3 + u'^2 (3 - c\; e^{-g u} z^4) - 6 u' z' \right) = 0\tag{1}$$
$$z'' + c\; e^{-g u} z^3 (-3 + ...
0
votes
0
answers
71
views
Solving the integral equation
Why does Wolfram Mathematica just rewrite my code instead of solving the integral equation? SigmaPhiBegin, SigmaPhiEnd are functions depending on Rho, Rho, bEnd, a, Kappa are constants. What needs to ...
3
votes
2
answers
143
views
Taylor approximation of integrals
I have BVP as in the picture and I want to solve it numerically by method given as follow. In the original paper, it is motioned that first iteration is computed and other are computed with Taylor ...
1
vote
1
answer
103
views
Using Reduce to simplify (not solve) system of equations
I'm dealing with a Mathematica program that generates a set of coupled non-linear equations involving an unknown function and its derivatives with respect to at least one independent variable. My goal ...
1
vote
2
answers
105
views
Normalized Coincident Detection Probability of Laguerre - Gaussian Modes
I am working on a paper in which a pump mode is passing through SPDC(Spontaneous Parametric Down conversion) is converted into two photons called as signal and idler. In which laguerre-Gaussian mode ...
1
vote
1
answer
65
views
Extract boundary points of an interpolating function obtained by NDSolve
Given a set of coupled nonlinear equations I want to extract the boundary points that appears in the interpolation function obtained as an output to NDSolve function and then to define them directly ...
1
vote
1
answer
70
views
Discrete number does not work well in DSolve
The code below works fine.
...
0
votes
1
answer
74
views
Which condition is better for WhenEvent?
I'm solving a non-linear system with NDSolve. See my previous post
In the WhenEvent, which one is better for ODE solving
...
0
votes
0
answers
37
views
Trouble implementing switching hybrid system with NDSolve
I'm trying to use NDSolve to simulate a hybrid nonlinear system that switches between different linear behaviors based on states and inputs (i.e. switching from one linear behavior to another) which ...
0
votes
0
answers
433
views
How to include impulses in differential equations?
I have two coupled differential equations as follows:
$$S'(t) = - \frac{a}{1 + B(t)} S(t),$$
$$B'(t) = \frac{c}{1 + S(t)} B(t) (1 - B(t)) - d B^2(t) \Big( \frac{1 - B(t)}{B(t)} \Big)^n,$$
where $a$, $...
0
votes
1
answer
68
views
1
vote
1
answer
49
views
Error in using the function NDSolve [closed]
I am trying to numerically solve a system of ordinary differential equations.
...
0
votes
0
answers
104
views
Apply the IntegrateChangeVariables function correctly
Please help me apply the IntegrateChangeVariables function correctly for my case. I need to change the integration variable from Tau to b(t). * in the photo corresponds to Begin in WM. Photo 3 shows ...
3
votes
2
answers
200
views
Is there a way to improve the speed of the NDSolve in my code?
I want to tell the background before raising the question of details.
My boss and I are designing synthersizer in a millimeter-wave chip. He analyzes the transient behavior with Julia. His code is ...
0
votes
1
answer
190
views
Using ParametricNDSolveValue and MultiNonlinearModelFit to fit an ODE system to datasets
I asked a question here about fitting an ODE system to given datasets. The great answer of @ydd solved the problem nicely. In the mentioned answer, the initial values are taken as the initial points ...
0
votes
0
answers
94
views
Problem with function DSolve
Please help me fix the error:
...
3
votes
3
answers
107
views
NDSolve fails to solve trivial PDE with mixed partial derivatives
Consider the following PDE with independent variables $(x,t) \in [0,1]\times[0,\infty)$
$$2u_{xt}(x,t)=u_{xx}(x,t)$$
initial condition $u(x,0)=1$ and with boundary conditions $u_x(0,t)=0$ and $u(1,t) =...
3
votes
2
answers
404
views
Modeling experimental data with differential equations
I have the following two sets of experimental data, which show the dependencies of two quantities, namely, $S$ and $B$, on time ($0$ h, $3$ h, $6$ h, $9$ h, $15$ h, $18$ h, $21$ h, and $24$ h):
...
-1
votes
0
answers
77
views
I want to know why my DSolve don't show any result
Why is DSolve not showing a result in the following code of mine?
...
2
votes
1
answer
70
views
xAct/xCoba and DSolve Don't Work Together
Context
I'm trying to derive the Reissner-Nordstrom metric for a charged nonrotating black hole using xAct. The idea is to first have a metric of form
$$ds^2 = e^{2\alpha(r)}dt^2-e^{2\beta(r)}dr^2-r^...
2
votes
2
answers
152
views
DSolve doesn't produce the expected result
I have the following function:
$$B(t) = \frac{a^n}{a^n + t^n}.$$
By taking derivative from both sides with respect to $t$ and after some manipulation, one obtains:
$$B' = - \frac{n}{a} B^2 \left(\frac{...
4
votes
2
answers
244
views
Optimizing an ODE fitting algorithm with interpolated data
Given data, I want to find parameters $p_1,p_2,k_1,k_2>0$ that fit the following ODE system
$$
\begin{align}
b'(t)&=p_1 a(t)-k_1b(t)\\
c'(t)&=p_2b(t)-k_2c(t)
\end{align}
$$
where $a(t)$ is ...
3
votes
0
answers
214
views
How to solve the following integrodifferential equation by generic approach?
Consider the following equation:
$$
\frac{\partial f}{\partial t} - p H(t)\frac{\partial f}{\partial p} = \mathcal{I}[p,t], \tag 1
$$
Here, f = f[p,t], with p being ...
0
votes
0
answers
56
views
Calculating the largest Lyapunov exponent with NDSolve
I'm using Mathematica to compute the maximum Lyapunov exponent for a damped pendulum. Ideally, when the damping is zero, the exponent should be zero, and for finite damping, it should be negative. ...
1
vote
3
answers
101
views
NDSolve producing oscillatory results
NDSolve producing very oscillatory solutions even after not having any large numbers or warning/errors
...
1
vote
0
answers
52
views
Solving PDE for Diffusion Equation (Boundary Condition Issue) [duplicate]
I am trying to solve this partial diffusion equation shown
$$\dfrac{\partial\overset\sim\rho_c}{\partial\overset\sim t}=D_c(\overset\sim r)A\left(\dfrac{\partial^2\overset\sim\rho_c}{\partial\overset\...