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
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
1
vote
1answer
61 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
57 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) = \...
23
votes
1answer
3k views

How do I use the new nonlinear finite element in Mathematica 12 for this equation?

With Mathematica 12 we get new technology for nonlinear finite elements. Out of curiosity, I just wanted to solve the following equation $$ \frac{d}{dx} \left( c(x) \left[\frac{d}{dx} u(x)\right]^p \...
0
votes
0answers
40 views

WhenEvent versus If function for ODEs

The following equation works for ParametricNDSolve ...
4
votes
1answer
85 views

Numerical continuation methods for bypassing a singularity when integrating an ODE

Here is the ODE I want to numerically integrate, odey=-l (1 + l) R[y] + (k - y) (-2 Derivative[1][R][y] + (k - y) (R^\[Prime]\[Prime])[y]) If we rearrange it in ...
2
votes
1answer
161 views

Coupled PDEs with second order spatial derivative

I'm trying to solve a system of PDE using NDsolve but the following error accors. NDSolveValue::femcmsd: The spatial derivative order of the PDE may not exceed two. Equations: Qm and Q are ...
3
votes
2answers
111 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 ...
1
vote
3answers
136 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: ...
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 ...
10
votes
1answer
891 views

ItoProcess for stochastic reaction-diffusion equation

I am trying to simulate a stochastic differential equation in time and space, but I'm unsure if this can be done in Mathematica. The sde that I would like to study is: $$ dN[x,t]=N[x,t](1-N[x,t])dt+\...
2
votes
1answer
79 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: ...
0
votes
2answers
56 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
44 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 ...
4
votes
2answers
120 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 ...
17
votes
3answers
1k views

Numerically solve the initial value problem for the 1-D wave equation

I want to solve the standard 1-dimensional wave equation $y_{xx}=y_{tt}$ using NDSolve (for $y(x,t)$) with the following conditions: ...
0
votes
1answer
54 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
3answers
2k views

Using NDSolve within Manipulate

I'm trying to use NDSolve inside manipulate. Specifically, I have a series of differential equations with coefficients, k1, k2, <...
0
votes
0answers
49 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 ...
1
vote
1answer
30 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 \...
0
votes
1answer
65 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 ...
7
votes
4answers
3k views

Nonlinear differential equation: numerical solution

I have to find and plot a numerical solution for this second order differential equation: u''[x] + (u'[x]/x) - (u[x]/(x^2)) + u[x] - u[x]^3 = 0 where $0\leq x &...
2
votes
1answer
79 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
0answers
35 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 ...
3
votes
1answer
43 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. ...
4
votes
1answer
653 views

Solve PDE with DiracDelta function

This question is related to Analytic solution of dynamic Euler–Bernoulli beam equation with compatibility condition. I think it is more appropriate to open another question on this topic. In the ...
2
votes
1answer
61 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 $\...
2
votes
1answer
102 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 ...
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}{\...
1
vote
1answer
64 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
56 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
81 views

Partial differential equation - DSolve gives no output, but solution exists

I have trouble obtaining solution for equation using DSolve: My mathematica code is given by: ...
0
votes
1answer
107 views

NDSolve and fitting [closed]

I have a system of non-linear first order differential equations I want to solve in the interval $[0,100]$ with NDSolve to get a numerical solution: ...
4
votes
2answers
261 views
0
votes
1answer
32 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 ...
1
vote
0answers
80 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
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
43 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 ...
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 ...
3
votes
1answer
130 views

Why does this StreamPlot evaluation cause a crash/memory wipe?

Bug introduced in 11.3 or earlier and persisting through 12.0.0 or later EDIT: Reported to Wolfram Support, currently CASE:4238258. For some reason, attempting to evaluate a simple StreamPlot will ...
2
votes
1answer
43 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 ...
45
votes
3answers
3k views

Mathematica vs. Comsol for finite element analysis?

Being relatively new to finite element analysis, I was wondering how expert users assess Mathematica's capabilities in solving PDEs via the finite element method compared to other commercial tools (e....
0
votes
0answers
39 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: ...
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 ...
0
votes
1answer
91 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 ...
9
votes
1answer
460 views

Solver for unsteady flow with the use of the Navier-Stokes and Mathematica FEM

There are many commercial and open code for solving the problems of unsteady flows. We are interested in the possibility of solving these problems using Mathematica FEM. Previously proposed solvers ...