Questions tagged [differential-equations]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
233 views

How to speed up the integral in NDSolve?

On the MMA.SE, there have been several question on how to solve equations including integral using NDSolve, see example 1, example 2, and example 3. Many people, ...
8
votes
0answers
216 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) ...
2
votes
1answer
75 views

Does 2D time dependent Schrödinger equation example work?

I have entered the example: www.wolfram.com/mathematica/new-in-10/pdes-and-finite-elements/solve-a-wave-equation-in-2d.html into 12.0, and gotten an error message in the uifWave assignment. It says,...
0
votes
1answer
52 views

Evaluation functions with lower and upper limit ODE?

How do I find the numerical value of y at 0 and also at 1. Here is my code. I appreciate any help. ...
0
votes
0answers
33 views

Implicit definition of a coordinate in differential equation [duplicate]

I would like to solve the following differential equation $\frac{d^2 \psi(r_*)}{dr^2_*} + (\omega^2 - V(r)) \psi(r_*)=0$ and the boundary conditions are $\psi(\inf) = \psi(-inf) = 0$. The problem is ...
0
votes
0answers
95 views

How to integrate this expression one time? [duplicate]

How can I integrate this expression? I want to have the second derivative of V i.e. V''[r]. Note that, you can multiply it be ...
0
votes
1answer
179 views

How to solve this differential equation analytically?

How can I DSolve the following differential equation? Is there an analytical answer to this equation? ...
7
votes
1answer
124 views

How to solve this 1st-order linear ODE system with a few discrete eigenvalues?

I am trying to solve the eigensystem of a 1st-order linear ODE system in the region $(-\infty,\infty)$ and with Dirichlet boundary condition at the infinities $$ -i\partial_xu(x)+f^*(x)v(x)=\lambda u(...
1
vote
2answers
58 views

Cannot solve coupled stochastic differential equations and how to find correlation of solutions?

I am trying to solve the equations $x'[t] = y[t]$, $y'[t]+(w^2+4*\gamma^2)x[t]+\gamma*y[t])=B[t]$ with the initial conditions $x[0]=0,y[0]=v_0$ This is what I have tried. ...
0
votes
0answers
64 views

Why doesn't DSolve work here?

I am trying to run this code (where f1, f2 and a1 are positive constants): ...
1
vote
0answers
91 views

NDSolve 2 functions 2 variables with intermediate calculation : (1 time-space eq) + (1 space eq)

I have a system of differential equation with this structure : $$\left\{\begin{split}&\partial_t n(t,r) + \nabla. \big(n(t,r)v(t,r)\big)=0 \\ & f\Big(n(t,r),v(t,r),\partial_r n(t,r),\...
5
votes
1answer
100 views

Problem with using NDSolve on wave PDE on string

I am trying to verify my hand solution for wave PDE in 1D, on a string. The solution I get from NDSolve does not match the analytical solution. This is a string, ...
1
vote
1answer
58 views

DSolve does not solve 2nd order linear PDE with variable coefficients

I find that DSolve can solve DSolve[x*D[u[x, y], {x, 2}] - D[u[x, y], x, y] == 0, u, {x, y}] or ...
1
vote
1answer
44 views

Solving a System of Differential Equations for Pendant Drop Application

So I'm trying to solve the system of differential equations describing a pendant drop. The system is as follows: ...
0
votes
0answers
31 views

Plotting 2D and 3D data for a nonlinear system in mathematica

I had to plot various nonlinear differential equations. But because of a large number of equations for large spans of time and other considerations, the program has become too heavy to be run on my ...
10
votes
0answers
164 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 ...
0
votes
1answer
71 views

How to solve a differential equation like this one? [closed]

Does anyone know how to solve this equation in Mathematica dx/dt = f(x) + u where f(x) = -x, if x < 1 or x = 1
4
votes
2answers
105 views

WhenEvent&NDSolve: How to detect saddle point?

I'm considering a simple ode. With the help of WhenEvent and Discrete Variable it is possible to detect the sign of the ...
0
votes
0answers
55 views

Numerical solution of a PDE having boundary conditions

I am solving a PDE using Mathematica. and I would like to know how to implement the condition that the three-variable function u[t, x, z] ...
1
vote
4answers
135 views

How to fit polynomial curve using Mathematica for multiple inputs?

I am new to mathematica. I have 3 inputs and 1 output. I want to find the 'N' th degree of polynomial which would approimately fit my dataset. I tried FindFit but it does not solve my problem. I also ...
0
votes
0answers
49 views

DSolve Coupled Equations

I'm new to Mathematica, and I am trying to solve a system of coupled equations with complex conjugates using DSolve before trying NDSolve. So far my code does not work, I was wondering if maybe you ...
0
votes
2answers
49 views

How to solve a complex equation

I am trying to solve a complex equation for 'z' in terms of 'f'. At the moment my Mathematica is stuck running... Just wondering if anyone has any ideas, I know 0 < z < 40 if that helps. <...
3
votes
2answers
71 views

Plotting the derivative of NDSolve divided by the solution

I'm trying to solve the Friedmann equation as is given by: $$ H^{2}=\Big(\frac{\dot{a}}{a}\Big)^{2}=H_{0}^{2}\big(\Omega_{m,0}a^{-3}+\Omega_{r,0}a^{-4}+\Omega_{\Lambda,0}a^{2.3}+\Omega_{k}a^{-2}\big),...
0
votes
0answers
119 views

Finding eigenvalues of a differential operator

I am trying to get the eigenvalues of the following differential operator $$L\psi(r) = -f \partial_r (f \partial_r \psi(r)) + V \psi(r)$$ which must satisfy (obviously) $$L \psi(r) = \omega^2 \psi(...
0
votes
0answers
37 views

Some issues with DEingesystem

I would like to solve (get its eigenvalues/vectors) the Sturm-Liouville problem, for the following differential operator: $L =\partial_{r} \partial_{r} \psi(r)$. Also, I would like to impose the ...
1
vote
1answer
64 views

Piecewise with differential equations

I have the following differential system. The calibration I use is as follows ...
1
vote
0answers
66 views

How could I know the Method adopted in NDSolve?

In NDSolve, different methods may lead to different results. For my codes ...
5
votes
1answer
135 views

Runtime too long for NDSolveValue, FindRoot breaks down at sharp turns

I have two equations: $$ \frac{2}{3}\thinspace\left(\frac{\varepsilon}{\Delta}\right)^{\frac{3}{2}}=\sum_{i=1,2} \sigma_i\lambda_{i}\left(1+\lambda_{i}^{2}\right)^{\frac{1}{4}}E\left(\frac{\pi}{2},k_{...
2
votes
3answers
153 views

Problem with boundary condition 2D heat transfer

I want solve this 2D Heat transfer: So at Mathematica: ...
1
vote
0answers
33 views

How should I enter systems of equations as index notation?

I'm trying to numerically solve a system of ODEs that I've worked out in index notation where it's not clear to me what the matrix representation of many terms would be, and writing each scalar ...
1
vote
2answers
77 views

DSolve of second order DE results in InverseFunction

As a result of evaluating DSolve[a''[t] a[t] - (1 - C) a'[t]^2 + (Cc - C L/3) a[t]^2 + (C - 1) k/2 == 0, a[t], t] I got an ...
5
votes
2answers
266 views

Find multiple solutions of a nonlinear ODE

I have a nonlinear ordinary differential equation with two parameters c and R in the form of: ...
3
votes
1answer
67 views

Piecewise function not evaluating in NDSolve

Perhaps it's something obvious, but why does this simple piecewise function (as well as other conditionals) not evaluate in NDSolve: ...
0
votes
2answers
78 views

Getting the coefficients of a series that solves a differential equations

I have an example from Stewart's Calculus where the equation $y'' + y = 0$ is solved using power series. The equation ...
0
votes
1answer
74 views

Getting errors from ParametricNDSolveValue

I am a newcomer to Mathematica (use ver 9.0). I just want to fit the experimental data to a system of odes' by using NonlinearModelFit. The data, contains time in the first column and product ...
0
votes
0answers
19 views

Parametrized vector function in PDE with DSolve/NDSolve

I'm trying to solve a PDE for a parameterized function $\vec x(s, t)$ where $t \in [0, T]$ and $s \in [0, T/h]$. This PDE reads as: $\frac{\partial \vec x}{\partial t} = \vec u (s, t)$, $ \vec x (s,...
0
votes
0answers
82 views

Problem with fitting

So I have a very simple question related to a simple topic, but also directly related to a fitting problem. I see that my question is related to this question but I don't manage to make the bridge ...
6
votes
2answers
168 views

Ndsolve problem with Sign (friction)

In a very simple model I consider the motion of a body with frictional force. ...
1
vote
2answers
87 views

Problem with using NDSolve to solve coupled differential equations [closed]

I am having a problem with the following code: ...
1
vote
0answers
72 views

How to impose a “boundary” condition inside a computing domain?

I need to set a "boundary" condition not at the boundaries of the computing domain but inside the domain during solving an ODE with FDM. The problem is a boundary value problem, which has been ...
1
vote
2answers
115 views

Warnings using NDSolve on wave PDE. “Using maximum number of grid points” , “Warning: scaled local spatial error estimate”

Version 12 on windows 10. I can't figure what should be changed in this call to NDSolve to make it happy. This PDE is solved by ...
1
vote
0answers
74 views

NBodySimulation

My question is about new NBodySimulation package in version 12. I figured out how to customize the basic functions "PairwisePotential", "PairwiseForce","ExternalPotetial"... The next unresolved issue ...
2
votes
1answer
62 views

Problem finding separatrices for ODE system

I have a system of two ODEs for which I would like to plot the separatrices. I tried the very neat method given here by Michael E2. Unfortunately, that code doesn't work for my system since the ...
1
vote
0answers
46 views

Separating periodic solutions from list of solutions in NDSolve

I am solving a second order differential equation using the following code ...
0
votes
1answer
48 views

Can't get Animate[] to work consitently

Wave on string from [0,L=10]. Endpoints fixed and initial conditions a double sinc: Ti1(x) = Sinc[3*(x - 7)] + Sinc[3*(x - 3)]. Initial velocity Ti2(x)= 0. Evaluating as expansion and trying to ...
0
votes
1answer
42 views

Problem with manipulate solution NDSolve and initial condition

I'm getting crazy with this Manipulate : ...
3
votes
2answers
109 views

Stability region of nonlinear ODE system

Sol is the evaluation at $t=100$ of the solution of a nonlinear system of three differential equations with initial values at $a$, $b$, $c$. This is obtained with the function ParametricNDSolveValue. ...
4
votes
3answers
422 views

Numerical second order differentiation

I have written a code for the second differentiation of numerical list ...
3
votes
1answer
48 views

How do I store the results of NDsolve, in a table for plotting later?

Basically, I wanted to vary a parameter in my differential equations, while using NDsolve (ParametricNDsolve wasn't working for some reason, but that's for another question). I'm stuck looking for the ...