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
5
votes
1answer
66 views

How to change the default normalization for NDEigensystem?

I'm currently using NDEigensystem to solve a PDE that describes a particle travelling on a hyperbolic (negatively curved) surface. However, the eigenfunctions that are returned by NDEigensystem are ...
-1
votes
1answer
67 views

Laplace equation for cylindrical rods

I have a system of four cylindrical rods with a certain radius, length, and separation. I have applied different voltages to the rods. I want to solve the Laplace equation, but I am unable to give ...
4
votes
1answer
74 views

Why unable to verify solution to first order PDE?

This is using V12 on windows. I solved this PDE by hand and wanted to ask Mathematica to verify my solution. But Mathematica solution does not look like mine. And when I tried to verify Mathematica ...
2
votes
1answer
59 views

DSolve Doesn't Return a Solution or Error

DSolve is not returning anything other than the original expression on ...
0
votes
0answers
40 views

How to solve integral equation involving Fourier Series

I have a set of equations involving two anti periodic functions $f(t+T)=-f(t)$ and $g(t+T)=-g(t)$ \begin{cases} f(t)&=J^2g(t)^3 \\ \mathcal{F}[g](\omega_n)&=\frac{1}{-i\omega_n-\mathcal{F}[...
3
votes
1answer
72 views

How to increase the integration domain of NDEigensystem without a “non-Hermitian” error?

Recently, I've been using NDEigensystem to solve a two-dimensional eigenfunction equation. The region that I'm solving over is as follows. ...
0
votes
0answers
55 views

Take limit in NDSolve

I have this equation : eqkk = D[k[t], {t,2}] - ((3 sola'[t]/sola[t]) + (3 sola''[t]/sola'[t]) - (1/(sola'[t] sola[t]^2))) D[k[t], t] To get $k(t)$: <...
2
votes
1answer
96 views

Poincaré sections for oscillating system

I need to build Poincare maps for solutions of a system of differential equations. This system includes the mass of an oscillating particle. If the mass value is made very small (m ~ 10 ^ -25) the ...
0
votes
1answer
50 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
1answer
90 views

Using multiple boundary conditions with NDEigensystem

I'm quite new to Mathematica and to Stack Exchange so I apologise if this question has already been answered. I've recently been trying to solve a partial differential equation to find the ...
0
votes
0answers
32 views

DSolve not giving a solution

I tried solving this but no result, I tried eliminating the initial condition, replace the zeroes in boundary condition but nothing is working. Thank you in advance
0
votes
1answer
53 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 ...
1
vote
1answer
62 views

Stiffness and NDSolve error NDSolve::ndsz:

I have a 2nd Order ODE problem I am trying to solve numerically in Wolfram: $$ (k^2-1+\frac{2x}{x^2+c^2})\frac{d^2y}{dx^2}+\frac{c^2-x^2}{c^2+x^2}\frac{dy}{dx}+x\frac{x^2-3c^2}{(x^2+c^2)^3}y=0 $$ ...
0
votes
1answer
61 views

Solve Heat Equation with Source Term and Neumann BC

I am trying to find a solution on mathematica to $ \partial_tu-\partial_{xx}u= \cos(2\pi x), \; 0<x<1,\; t>0 $ $ \partial_xu(0,t)=\partial_xu(1,t)=0, \; t>0 $ $ u(x,0) = \...
0
votes
0answers
40 views

WhenEvent versus If function for ODEs

The following equation works for ParametricNDSolve ...
1
vote
1answer
52 views

DSolve behaves weirdly with dynamic [duplicate]

I am an beginner in using dynamics as well as mathematica. I am trying to ask mathematica to solve and plot the solution of X'=AX with dynamic every time my matrix A updates. However the Dsolve ...
3
votes
2answers
112 views

How do I solve a certain differential equation?

I need to find out a solution to the equation: z r[z] r''[z] - (d - 1) r[z] (r'[z])^3 - (d-2) z (r'[z])^2 - (d - 1) r[z] r'[z] - (d - 2) z == 0 subject to the ...
0
votes
0answers
54 views

Problem with NDSolve and Manipulate function

I'm having an issue with commands NDSolve and Manipulate. I'm trying to represent the rotation spin, nutation and precession of a spinning top (approximated to an inverted cone). Under specific data ...
1
vote
2answers
109 views

Fitting experimental data with a parametric function

How does one use a fitting routine such as NonlinearModelFit with a ParametricFunction? Example below: First let's generate some data: ...
2
votes
1answer
83 views

ParametricFunction from ParametricNDSolveValue changes when evaluated?

I am new to using ParametricNDSolveValue (and ParametricFunctions in general), so I am hoping that I have made a simple error. First I set up a system of differential equations: ...
1
vote
1answer
45 views

How to provide a system of input every x time interval (e.g, x=1 week)

The following code described an input to the system only during t less than minInfusionTime after time zero. Any way to give this same input every x time (e.g. every week) after time of zero, to an ...
0
votes
1answer
58 views

DSolve not working on vector equation

Ok, so I'm trying to solve a differential equation of motion, and mathematica doesn't do anything to my input. It just leaves it unevaluated. I know that the system is physically solvable with not ...
4
votes
2answers
131 views

Non Linear Model Fit - Fitting ODE to Data

Thank you everyone for your meaningful contributions! My Goal and Problem I'm trying to fit a particular ODE in a set of ODE's to experimental data. I've attempted to implement this by following the ...
0
votes
2answers
60 views

Parametric Find Maximum

I'd like to plot the maximum of a curve in function of a parameter. Meaning I looking for maxima that depend on a parameter. Here is what I tried to do but FindMaximum is not parametric, so it did ...
1
vote
1answer
31 views

FindMaximum with parametrized NDSolve

I am trying to solve a parametrized ODE, and wanting to find the parameter that maximize the solution at a specific point. For example, in the following code I am trying to solve the ODE $df/dz=t \...
1
vote
3answers
138 views

Why doesn't Mathematica evaluate the series with recursion relationship as expected?

I define a series $dg(i)$ as the $i$th derivative of a function $g[t]$ for $i>0$ and known the first term $dg(1)=(t-x)g(t)$. In mathematica, the code is: ...
1
vote
0answers
58 views

Specify direction of propagation in the 1-d wave equation in NSolve and NDSolve [duplicate]

I am solving the 1-d wave equation with the following initial conditions: ...
0
votes
0answers
36 views

Defining a function through an ODE containing unspecified operators

I want to do some algebra using a function only defined through a DE containing unspecified operators. The DE is $$ \partial_zu(z) = \left[\hat{D}+\hat{N}(z,u)\right] u(z). $$ Here $u$ lives in ...
2
votes
1answer
92 views

Using NDEigensystem to find 100 eigenvalues

I'm using "NDEigensystem" to calculate a Sturm-Liouville problem, for which the first 100 eigenvalues are needed. The code is like this: ...
0
votes
1answer
67 views

Plotting basins of attraction of magnetic pendulum in spherical coordinates

I am new in Mathematica, and this is the first time I coding. Following is the code solving differential equations of motions in spherical coordinates of magnetic pendulum and plotting basins of ...
3
votes
1answer
45 views

NDSolveValue::bcedge: Boundary condition is not specified on a single edge of the boundary of the computational domain

I'm solving a Schrödinger's Equation in 1d, where $\Omega$ is the domain, bcs the periodic boundary condition, init the initial condition. ...
2
votes
1answer
128 views

Problems in running the non-linear PDE system

I'm new to the mathematica and just try to solve an seemingly simply non-lineal coupled PDEs. It is about the diffusion-reaction kinetics in a pellet.The code seems workable, but keep running without ...
1
vote
1answer
70 views

Estimating parameters on system of differential equations

I am looking for some help estimating the parameters of a series of differential equations to assist fitting the experimental data I have collected. The Problem: The equations are based off of the ...
0
votes
0answers
52 views

Analytic continuation of an ODE solution with ParametricNDSolveValue

I am working on the analytic continuation of a solution of the $2\times 2$ system $$dT=TP,\quad T(1)=Id$$ where $P$ is of the form $$P=\begin{pmatrix} 0 & t^{-1}\\ \frac{t}{4}+(t-1)^2\left(\frac{r ...
2
votes
1answer
63 views

Describing solution of particular ODE with small parameter

I have differential equation (1) $x''+2\epsilon \nu x'+x+\epsilon x^3=0$. I try to solve it using a method of multiple scales. So $x=x(t)=x(T_0,T_1,T_2,...,T_n)$, where $T_i=\epsilon^i t$. Then $\...
0
votes
0answers
48 views

How to Solve a Differential Equation System Depending on Variable Solved in an Implicit Function?

I have an ordinary differential equation system need to be solved by using Mathematica. $\frac{dk(t)}{dt}=((1-\kappa(t))k(t))^{\alpha}(1-\frac{\kappa(t)}{\kappa(t)+\frac{1-\alpha}{\alpha}\frac{\eta}{\...
0
votes
0answers
57 views

How to solve this NDSolve problem in Mathematica?

I found a confused problem in solving a ODE problems with NDSolve in Mathematica, the code is as follows: I have tried 'Clear[Derivative]' and restart the kernel but these methods don't work. Here ...
3
votes
1answer
52 views

How to utilize a Pick[] command in a differential equation

The code below is a simplified example of a problem I am working on. I first define a relation V that depends on x[t] and ...
0
votes
1answer
33 views

NDSolve output - ParametricPlot not plotting

I cannot understand why I cannot reproduce an example given in the NDSolve command help. Namely I would like to plot the steepest ascent path on the surface $z = x^2-y^2$, starting from the point $(0,...
1
vote
1answer
42 views

Context issues when using NDSolve and rule substitutions in a package [duplicate]

I have a .wl package and a demo .nb notebook. The package file is testPackage.wl and it ...
0
votes
0answers
34 views

Solving a system of equations with a specific shape of the solutions

I have a system of four equations, which are: ...
0
votes
1answer
47 views

Why is this NDSolveValue function remembering past inputs?

I have been attempting to generate a function that uses NDSolveValue to return the value of a solution to a system of ODE's when an event condition is triggered, as a function of the initial ...
4
votes
2answers
266 views

Adding conditions to stochastic differential equations

Consider the following process ...
0
votes
0answers
40 views

Why do I get a blank graph when using Manipulate with NDSolve?

I'm trying to model an SIR model using the Manipulate function so that I can change the parameters. Although, when I enter in the following code: ...
2
votes
1answer
44 views

Find x at a given t and f(x,t) == constant from a system of coupled PDE

Is it possible to find the speed of a moving front (produced by the below code) in which modulating beta changes the speed of the front? Basically, I am trying to map the x-values of f(x,t)=0.5 ...
1
vote
0answers
83 views

Problems with the eigenvalues calculated using NDEigenvalue

I'm trying to solve a Sturm-Liouville problem like $\qquad -\psi''(z)+(\frac{1}{z}+2\,z)\psi'(z)=\lambda\,\psi(z)$ using NDEigensystem in order to learn how to ...
0
votes
1answer
53 views

Implicit piece-wise function in derivative for differential equation solver

I want to set up a model/simulation that involves numerically solving a set of coupled differential equations, but at some point in time I want some of the variables to quickly jump to a constant ...
0
votes
1answer
98 views

Adding a limit in NDSolve to avoid division by zero

I'm trying to solve a set of differential equations in which one of the functions that describe the time derivative gets values which make it divide by zero ...
20
votes
2answers
2k views

Wrong answer from DSolve when solving a differential equation

Bug introduced in 12.0.0 I was trying to solve the following differential equation: $$\frac{dy}{dx}=x^2+y^2-1 \quad \text{and} \quad y(0)=1$$ and I used the code below: ...
0
votes
0answers
38 views

Manipulate plot of a system of PDEs with NDSolve

Modeling 1D diffusion of an enzyme, e, through a sphere with substrate, s, I arrive at the below equations: I then pass these equations to NDSolve, Evaluate at a range of r and t and Plot and ...