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
9
votes
3answers
279 views

Stress analysis in axisymmetric bodies

I would like to do some finite element calculations in axisymmetric cylindrical coordinates. I wish to calculate stress in terms of {r,z} coordinates. The radial ...
2
votes
1answer
748 views

Solving a nasty partial differential equation [closed]

I have a differential equation that I would like to solve numerically in the region $z \in [0,L]$ and $t \in [0,t_{max}]$: $$ \partial_t S(z,t) = f(z)S(z,t) + \int_0^L \text{d} z'g(z,z') S(z',t), $$ ...
3
votes
1answer
117 views

Solving partial differential equation involving Hilbert transform

While solving one research paper published in Physical Review Letters, I came across the following equation and I am unable to solve it. $$\frac{\partial f}{\partial t}−(\mathcal{H}(f)\left(\frac{\...
1
vote
2answers
69 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 ...
0
votes
1answer
70 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 ...
3
votes
1answer
64 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
88 views

How to get the derivative with StepMonitor?

I am trying to use StepMonitor inside of the NDSolveValue function for a complicated system of differential equations, but the simple example below shows my issue just fine. I am trying to obtain ...
0
votes
2answers
76 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 ...
9
votes
2answers
772 views

Fitting experimental data by using ParametricNDSolveValue and NonlinearModelFit

I am a newcomer to Mathematica. Basically I just want to fit the data (enzyme kinetic data) shown below to a system of odes' by using NonlinearModelFit. The data, an 101x2 array, contains time in the ...
6
votes
2answers
162 views

Ndsolve problem with Sign (friction)

In a very simple model I consider the motion of a body with frictional force. ...
0
votes
0answers
18 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,...
1
vote
2answers
86 views

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

I am having a problem with the following code: ...
0
votes
0answers
81 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 ...
0
votes
1answer
143 views

Why can’t DSolve give a solution for an exponential function?

How to solve a nonlinear Second-Order ODEs like the following in Mathematica? $ y’’(t) + y’(t) - e^{y(t)} = 0 $ I tried DSolve, but it dose not work: ...
1
vote
2answers
123 views

Validating a solution for a differential equation with DiracDelta

For the following differential equation $\displaystyle-\frac{\partial ^2\phi2 (x)}{\partial x^2}+\lambda ~[\phi2 (x)]^3-\mu ^2~\phi2 (x)=\phi2(x)~\delta(x)$ ...
1
vote
0answers
67 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 ...
3
votes
2answers
99 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. ...
1
vote
2answers
109 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 ...
6
votes
3answers
502 views

How to set interface conditions for optical waveguide in NDEigensystem?

I have been working on waveguide mode analysis using FEM in Mathematica for a week, but I haven't succeeded until now. The optical fiber-like waveguide is featured with different refractive index in ...
2
votes
1answer
55 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
65 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 ...
1
vote
0answers
44 views

Separating periodic solutions from list of solutions in NDSolve

I am solving a second order differential equation using the following code ...
17
votes
2answers
3k views

Plotting separatrices for nonlinear system

Consider the system: \begin{align*} x'&=(1-x-y)x\\ y'&=(4-7x-3y)y \end{align*} The system has a saddle point at (1/4,3/4). How can I plot the separatrices on the phase portrait having domain ...
4
votes
3answers
418 views

Numerical second order differentiation

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

Mathematica cannot compile complex-valued interpolated PDE coefficients? (NDSolve, Finite Elements)

Bug introduced in 11.1 or earlier, fixed in 11.3 or earlier. The following PDE pde = I Cos[x y] D[u[x, y], x] + Laplacian[u[x, y], {x, y}] == 0; Is happily ...
1
vote
1answer
67 views

Errors from NDSolve [on hold]

I'm trying to solve a system of PDEs with periodic boundary conditions using NDSolve. This works if I don't specify an initial condition (but is uninteresting, ...
0
votes
1answer
37 views

Problem with manipulate solution NDSolve and initial condition

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

Vortex motion equation for flux-flow instability

I am solving the motion equation of an isolated vortex oscillation in a superconductor. I am assuming that the driving force is generated by an RF current oscillating at 1.3 GHz. The main point of ...
4
votes
1answer
91 views

Triggering WhenEvent as a result of WhenEvent

I'm attempting to solve a dead-simple differential equation with events: ...
3
votes
1answer
41 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 ...
0
votes
1answer
79 views

Modelling a cylinder [closed]

I am fairly new to Mathematica. I am trying to model an ideal cylinder of uniform density of radius R (any arbitrary value) which has a cylinder of radius R/2 missing from it. The resulting solid is ...
0
votes
1answer
28 views
0
votes
0answers
18 views

How to enhance the precision of the numerical solutions of ODE

Given an ODE $$D f=0$$ over the interval $[x_0,x_1] \subset \mathbb{R}$, where $D$ is a linear differential operator. I can compute the boundary condition $f(x_0)$ to a very high precision, as high as ...
1
vote
2answers
119 views

Solving BPV of second order nonlinear ODE through NDSolve

I'm trying to solve a 2nd order related ODE system in two region using Piecewise. BC: 1) y'[0]=0 and at y'[1.6]=0 while at 1 <...
1
vote
1answer
88 views

Help Solving a Diff Eq (Or, why can't Mathematica handle this?)

I have the following differential equation that I'd like to solve: \begin{equation} \begin{split} &0 = \left[\left(-216x^2+405x-171\right)\sqrt{-3x^2+6x-2}+216x^3-567x^2+429x-90\right]y'(x)\\ &...
1
vote
1answer
109 views

Different solutions with Mathematica and WolframAlpha

I tried to resolve this in a notebook of Mathematica: DSolve[x[t]^2 (1 + x'[t]^2 - x[t] x''[t])/(2 (x[t]^2 (1 + x'[t]^2))^(3/2)) == 0, x[t], t] And the results ...
2
votes
1answer
99 views

Problem when solving differential equation [closed]

Can anyone tell me why do I have errors when I try the code below ? ...
0
votes
0answers
133 views

Solving a second order ODE with ParametricNDSolveValue

I am trying to numerically solve a nonlinear ODE on the interval 0 to R, using ParametricNDSolveValue. The boundary conditions ...
0
votes
0answers
30 views

NDSolve is not always easy to handle [duplicate]

I solve the PDE system analytically and numerically and get totally different results. Should there be a solution to the problem of the numerical solution, one must ask oneself - do you know the ...
0
votes
1answer
64 views

Integrate a function of NDSolve

I'm having this problem of integrating a function that's the solution of a NDSolve multiplied by another function. I basically compute a cycle wich add at each step the quantity ...
4
votes
2answers
86 views

Vector-valued ParametricNDSolve, solving for a combination

I am integrating two vector differential equations using ParametricNDSolve, one for $\mathbf{Y}$ and one for $\mathbf{Z}$, and then I'm interested in a combination ...
3
votes
1answer
113 views

Vector ParametricNDSolve and FindRoot interaction

This question came out of this question. I have a set of differential equations, written in vector form. I'm only interested in the value of these at the endpoint, and so I use ...
0
votes
1answer
51 views

How to keep the numerical integration when an event occurs?

I'm numerically integrating the following system, f[r_] = 0.904965 - (1 + 12.7028/r^2) (1 - 2/r) dϕdλ = 1/r[λ]^2; eqc = r'[λ] == Sqrt[f[r[λ]]/(dϕdλ^2)]; with the ...
3
votes
1answer
64 views

Help with solving a PDE and plotting its solution

I have trouble with solving the PDE with periodic boundary condition, which appears to be stiff somewhere, so I tried "StiffnessSwitching". But the code still doesn'...
6
votes
1answer
62 views

Can I stop a running NDSolve calculation without losing the data it obtained so far?

I would like to solve a system of ODEs numerically using NDSolve on an interval {t,t0,tf}. For the systems I currently solve, ...
0
votes
1answer
74 views
1
vote
0answers
43 views

Can I store output data in the Notebook file? Specifically output from NDSolve[ ]

I am having some outputs from NDSolve of the form {{x→InterpolatingFunction[…], y→InterpolatingFunction, … }} and the ...
0
votes
1answer
55 views

Coupled PDEs: Wave and String Equations

I need to solve a system of mixed string and wave equations. Omitting some constants it looks like this: $$u_ {\text {yy}} (y, t) - u_ {\text {tt}} (y, t) = \varphi _{t}(x, y, t)$$ $$\nabla _{\{x,y\}}...
0
votes
0answers
26 views

Underflow and Machine Precision

I am using Mathematica to solve a system of differential equations and evaluate and plot the solutions on an interval. The solutions have non-zero solutions, but Mathematica underflows in a portion of ...