Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
19 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 ...
4
votes
3answers
324 views

Numerical second order differentiation

I have written a code for the second differentiation of numerical list ...
5
votes
3answers
390 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 ...
3
votes
1answer
55 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
52 views

Errors from NDSolve

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, ...
1
vote
0answers
48 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. ...
0
votes
1answer
26 views
1
vote
2answers
57 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
88 views

Triggering WhenEvent as a result of WhenEvent

I'm attempting to solve a dead-simple differential equation with events: ...
3
votes
1answer
36 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 ...
2
votes
1answer
48 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{\...
0
votes
0answers
65 views

How to include an integral constraint in FindRoot?

I want to include an integral constraint during ODE solving with FDM. The problem is actually a boundary value problem and the integral constraint includes the function $u(x)$ and an undetermined ...
0
votes
0answers
72 views

Solving a matrix stochastic DE in terms of given parameters

I am trying to solve the time-dependent 4 by 4 matrix stochastic DE using Mathematica. Would it be possible to solve in terms of the given parameters and to find the covariance matrix? The problem is ...
0
votes
1answer
70 views

Modelling a cylinder

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
0answers
17 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
1answer
41 views

Variation of the biharmonic equation with Neumann conditions

I am currently writing a script to plot the solution of a variant of the biharmonic equation. In this case the equation I want to solve is ...
1
vote
2answers
94 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
79 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
104 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
97 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
131 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
0answers
64 views

Singularity problem when r=0 for axysimmetric case in cylindrical coordinates

I wish to calculate displacements u and w in terms of {r,z} coordinates, on a rectangular domain by following example from :Stress analysis in axisymmetric bodies. But I get this problem when r=0 for ...
0
votes
0answers
31 views

NDSolve: “StopIntegration” button using WhenEvent does work [closed]

EDIT The problem is solved. I made a mistake: As I have been pointed at in the comments, I forgot to set stop=False before starting the integration. My bad, sorry! ...
0
votes
1answer
63 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
85 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
105 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
50 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
63 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
55 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, ...
1
vote
0answers
41 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
51 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
22 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 ...
14
votes
2answers
2k views

Turing patterns

I am new in learning Turing patterns. Is there any sample code available to generate such patterns in ecology model (Lotka–Volterra model)? The above figure is taken from this paper, and is based on ...
6
votes
1answer
114 views

Wavepackets as solutions of PDEs

I'm currently doing a mathematica for physicists course and am struggling to solve a problem we were given! I'm supposed to define an initial wavefunction in a harmonic oscillator (displaced, ...
1
vote
1answer
33 views

Numerically approximating the series of the solution to a PDE

Suppose I had a PDE such as the heat equation in two variables, and I want to solve it with mathematica, and ask it to return me a series expansion of the solution. For example, ...
2
votes
1answer
79 views

Problem with NDSolve: Maximum number of steps reached

I am using NDSolve to solving a first order autonomous system of ODEs $\dot x(t) = f(x(t))$, $x\in\mathbb R^n$ numerically for a set of initial conditions $x(0)=a,b,...
0
votes
1answer
47 views

Could not able to set up a differential equations using EulerEquations command

I have a constructed the Lagrangian of a mechanical system by finding the kinetic and potential energy of the system. Then I tried using EulerEquations to set up a differential equation by taking the ...
0
votes
0answers
59 views

Solve a Differential equation analytically instead of numerically

I want to solve the differential equations (shown below in the list 'eqs') analytically instead of numerical. Using NDSolve the following code works perfectly fine but using DSolve it doensn't. I ...
0
votes
0answers
37 views

Why DSolve gives the error “Arguments should be ordered consistently” on this PDE?

This problem is strange. Mathematica is able to solve this PDE with no error ...
2
votes
1answer
161 views

How to solve a PDE with periodic boundary conditions in one of the variables?

I need to solve a PDE where one of the variables is an angle, so I need to know how to deal with periodic boundary conditions. As a warm up, I am trying to solve the Helmholtz equation in polar ...
0
votes
2answers
115 views

Mathematica unable to interpret equations in DSolve

I'm trying to solve a system of seven ODEs with seven conditions. Since the following approach using DSolve is yielding the same output as the input, Mathematica can't find a solution. ...
1
vote
1answer
49 views

Using ParametricNDSolve to solve a hysteretic ODE (Wolfram Mathematica 10.0)

I am trying to solve an ordinary differential equation using ParametricNDSolve and I want to fit the solution to some data to get the value of the parameter. The problem I have is that the ODE is ...
5
votes
2answers
152 views

Solving linear coupled PDEs by FDM

I am trying to solve some linear, coupled PDEs for perturbative analysis (first order in time, 3rd order in space), for which I then plan to take the global spatial maxima of their magnitudes and plot ...
0
votes
0answers
91 views

Simplify the equation in terms of function and coefficients?

I have two fourth order differential equations and eight boundary conditions. I want to get my result in terms of function (Y) and coefficients (let say P1, P2 and so on). I used Dsolve to get the ...
3
votes
1answer
64 views

Hat function(UnitTriangle[x]) is really applicable in Finite Element Method?

I am learning finite element method(galerkin method) for solving ode/pde. when searching this topic, I often see examples using the hat functionUnitTriangle[x] as ...
-1
votes
0answers
46 views

Unable to Solve Partial Differential Equation (DSolve) [on hold]

I have to solve this PDE analytically. I am giving the input as shown in the image but when I am moving forward, there is no solution generated. Why? Do I need to give any more input?