Stack Exchange Network

Stack Exchange network consists of 174 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
33 views

Non-autonomous ODE use NDSolve, error: Step Size is effectively zero; singularity or stiff system is suspected

I have seen this error NDSolve::ndsz many times when I use NDSolve to get the solution of a non-autonomous ODE. I try but all ...
3
votes
1answer
31 views

Creating a domain for NDSolveValue via ParametricRegion

A circular arc $R_2$ can be defined parametrically as $R_2 = \langle x(s),y(s) \rangle : s\in[-s_0,s_0]$ (see code below for specific $x,y$ definitions) where $s_0$ is given (I must make the arc this ...
0
votes
1answer
20 views
0
votes
2answers
57 views

How can I plot this integral?

I am in the following situation: I have a complicated ODE for the function f[x] that has no anlytical solution and an integral that depends on ...
0
votes
0answers
34 views

PDE solution of the form F[x1,x2][x3,x4]

I am trying to solve a PDE on Mathematica and the solution has the form F[x1,x2][x3,x4]. How do you interpret this function in mathematical terms?
3
votes
2answers
87 views

NDsolve with ODE-PDE

Kindly I hope to know what is the wrong here. How to use NDsolve for a coupled ODE-PDE differential equations ...
0
votes
1answer
48 views

ParametricNDSolve[] for Double Damped Pendulum

I am trying to plot Driven Double Pendulum with a control Parameter "Gamma". My understanding is that as this gamma approaches a critical value, the pendulum is pushed towards non-linear regime, and ...
1
vote
1answer
79 views

NDSolveValue for Laplace equation not converging to analytic solution

I'm solving Laplace equation $\nabla^2 \phi = 0$ with BC's $\phi_x(x=\pm 1) = 0,\, \phi_y(y=-h) = 0$ with a specified BC along the circular arc $x^2 + (-1 + y)^2 = 4$, which I call $\Gamma$ (so the ...
2
votes
2answers
140 views

Eigen values of a third order linear homogenous ODE

From a system of PDEs where i used the following ansatz: $$\theta_w(x,y) = e^{-\beta_h x} f(x) e^{-\beta_c y} g(y)$$. $F(x) := \int f(x) \, \mathrm{d}x$ and $G(y) := \int g(y) \, \mathrm{d}y$ So, $$\...
4
votes
1answer
104 views

Recycling solutions of multidimensional NDSolve

Dear wolfram community, I hope my problem is clear and easy to solve. I have already solved the following heat equation over a domain: ...
-1
votes
1answer
49 views

Protected tag error using NDsolve [on hold]

I have been successful at solving the PDE when I have specified the $r$ I am using, but now when I try and allow $r$ to be a variable and input its value in a function I am getting all sorts of errors ...
4
votes
2answers
641 views

Mathematica gives an unexpected answer for Integrate [on hold]

I need to integrate the following: \begin{equation}\tag{1} \frac{\sqrt{C + (1 - C) x^3}}{x}, \end{equation} where $0 < C < 1$ and $x$ is a positive variable (then $x^3 \ge 0$). When I integrate:...
0
votes
1answer
52 views

Reduction of differential operators

Suppose my code outputs the expression $$\frac{f^{(0,2)}(r,\phi )+r \left(f^{(1,0)}(r,\phi )+r f^{(2,0)}(r,\phi )\right)}{r^2}$$ This is simply the Laplacian $\nabla^2f(r, \phi)$. Is there a way ...
0
votes
1answer
78 views

Solving the spherical harmonics PDE using DSolve

I am trying to solve the spherical harmonics PDE in Mathemtica. My code is: ...
0
votes
2answers
76 views

Solving non-linear differential equation with respect to a parameter

I want to solve this equation and get a 2-dimensional plot with N2 on X-axis and theta(1) on ...
0
votes
0answers
34 views

Commutator of differential operators

Let $P_x = \frac{\hbar}{i}\frac{d}{dx}$, after specifying the commutator relation symbolically $[X, P_x] = i\hbar$, I can ask Mathematica to calculate commutator algebra. My question: is there a way ...
0
votes
0answers
23 views

EDO with parameter, divergence and stop integration

I'm trying to solve an ODE which independent variable is time, where there is a parameter involved, let's say $\beta$. I need to plot the final solution in terms of $\beta$. The equations, initial ...
3
votes
1answer
90 views

Complex first-order differential equation

I have a differential equation $\frac{dx}{dt} = \sqrt{1+x^4}$ $x$ is a complex variable. I want to solve it for some given initial condition, and plot the solution (real part vs. imaginary part). ...
0
votes
1answer
57 views

Speed up ParametricNDSolve

I' m trying to solve a second order ode with one parameter.However the solution is taking too much time. I tried using ...
0
votes
1answer
92 views

numerical solution of nonlinear differential equation : parameter fitting

I want to fit data X-axis and Y-axis are L and P, respectively n'[L,t] == L a - b n[L,t]^2 - c n[t]^3, n[L,0]==0 a,b,c is independent parameters. P value is ...
4
votes
1answer
133 views

why this PDE causes internal 1/0 division?

Assigned WRI Case number 4210941 Using 11.3 on widnows 10, this input ...
2
votes
2answers
78 views

How to solve a Bessel differential equation with a boundary condition at infinity?

I'm trying to solve a differential equation which solution is in the form of Bessel functions. One of the boundary conditions is at infinity. I use: ...
0
votes
2answers
56 views

DSolve - Unable to obtain plot of solution - 2nd order ODE

I am trying to solve the equation below with DSolve. The equation is that of a wave, expected to fall off exponentially as r approaches infinity. The solution is a combination of Spherical Bessel ...
0
votes
0answers
30 views

How to calculate Lyapunov constants for dynamical systems using Mathematica? [duplicate]

How to Calculate Lyapunov constants for Dynamical System using Mathematics?
0
votes
0answers
44 views

How to sum over the variable in partial derivative operator?

I need to use the partial derivative operator in Wolfram Mathematica within a summation, specifically to define the D'Alembertian operator of scalar fields. I am having trouble summing over the D ...
4
votes
1answer
56 views

Multiple Boundary Conditions for NDSolve in mesh with multiple interfaces

Here is my problem: I want to solve a Laplacian equation in a 2D geometry with multiple interfaces, each interface presenting a different boundary condition. As for an example, I am working on a ring ...
3
votes
1answer
127 views
-2
votes
1answer
44 views

ParametricNDSolve

want to solve this equation and get 2 dimensional plot with N2 on X-axis and theta(1) on the Y-axis with x from 0 to 1 and ...
1
vote
0answers
48 views

Solve delay differential equations manually. Why does this return horizon line?

From Sample,This works correctly. sol = NDSolveValue[{x''[t] + x[t - 1] == 0, x[t /; t <= 0] == t^2}, x, {t, -1, 5}]; Plot[sol[x], {x, -1, 5}] Now I want to ...
0
votes
0answers
39 views

Stability of time dependent PDE

Recently in another post I asked a question regarding typing the following PDE to solve in Mathematica. I have the following PDE: $\qquad \frac{\partial P(x_1,x_2,t)}{\partial t} = -\frac{\partial}{\...
2
votes
1answer
90 views

Parametric plot of the critical points of an ODE

I have a single ODE of the form x'[t] = -(y*n*n + z*n) x[t] + w (1-x[t]) x[t] where the second part of the ODE is the logistic growth with the maximum allowed ...
6
votes
1answer
101 views

Solving a system of coupled non-linear partial differential equations

I am trying to solve a system of coupled non-linear partial differential equations, 2D spatially + time. The equations are: where c, d, and p are constants. I am solving for the functions Az and Bz ...
0
votes
1answer
53 views

Increasing MaxExtraPrecision arbitrarily changes numerical result

I am trying to confirm that a function $f$ satisfies a particular differential equation of the type $D f=0$, for some differential operator $D$. I set $Df$ as Diffeq...
3
votes
2answers
100 views

Initial values of position (x) and speed (v) of a particle visualizing using Mathematica

$$\vec{F}(\vec{r})=-m\omega^2\begin{pmatrix}x\\4y\end{pmatrix}$$ I have the force $F$ shown above. How could I specify the initial values of position ($x$) and speed ($v$) in Mathematica using the <...
0
votes
0answers
40 views

Problem with NDSolve::ndnum error when trying to solve a system of differential equation

I get the error reported as NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.` when trying to run the following code: ...
0
votes
1answer
47 views

parametricNDSolve for solving differential equation

i want to solve this equation and plot it solution w.r.t N2 and theta(0) theta''[x] + 2*theta'[x] - Exp[-2*x]*(N2)^2*(theta[x] - 5) + Q1 == 0 anyone please help
2
votes
2answers
118 views

Using WhenEvent to limit the derivative

In the system below, would like to keep z[t] between 0 and 1. The intent of the code below is to use WhenEvent to detect when z[t] reaches the limit of 1, and then only allow negative values of the ...
2
votes
2answers
165 views

Solve PDE with complicated coefficient non-linearity [on hold]

I wish to solve is the heat equation with solution-dependent coefficient. The equation along with BC's and IC's are as follows: $\begin{equation} \frac{\partial P[x,t]}{\partial t}-\alpha[x,t]\frac{\...
1
vote
1answer
111 views

How to solve fourth order differential equation?

I have a differential equation of this type: y[x] - 1 - 2*l^2*y''[x] + l^4*y''''[x] == 0 (where l is a parameter and ...
0
votes
1answer
62 views

Simplify DSolve solution with products of square roots

The following code solves a simple 2nd-order linear differential equation with all real parameters. ...
1
vote
1answer
60 views

WhenEvent detects only the first event

My code is based on the suggestion in this discussion by Michael E2 And when I'm using the same definitions the WhenEvent function locates only the first time the ...
0
votes
1answer
46 views

Why WhenEvent doesn't work in this case?

yb[a_?NumericQ] := a^2; eqns = {x'[s] == -yb[s], WhenEvent[x'[s] > 0, {yb[s] -> - yb[s]}], x'[0] == 0} NDSolve[eqns, x[s], {s, -50, 50}] The WhenEvent ...
2
votes
1answer
50 views

How to set the NeumannValue conditions when the conditions are Discrete points?

For example i can use Piecewise when the condition is a Continuous function ...
3
votes
1answer
42 views

How to trigger WhenEvent for NDSolve in parallel?

Say I have a system of differential equations that I need to solve for different initial conditions and say the process is sufficiently expensive and I have sufficiently many that I am calculating in ...
1
vote
1answer
35 views

Solution dependent variable -how to use WhenEvent

I'm having trouble using WhenEvent function in two-dimensional functions: My goal is to change the value of a diffusion coefficient $\alpha[x, t]$ as a function of ...
3
votes
3answers
79 views

DSolve returns incorrect solution by automatically assuming positive parameters?

The following code solves a simple 2nd-order linear ODE with real parameters $a,b$. ...
0
votes
2answers
54 views

Specifying history for delay differential equations ``near infinity'' (using NDSolve)

Consider the following DDE: $ f''(x)+ f(x+ 1) = 0.$ For $ x \gg 1$, this DDE should approximately reduce to that of a simple harmonic oscillator: $f''(x)+f(x) \approx 0$. Suppose that for some ...
1
vote
2answers
141 views

Solving a nonlinear system of 2nd order ODEs with NDSolve

I'm trying to solve a 2nd order related ODE system with five dependent variables. The code is: ...
0
votes
1answer
75 views

Solving a difficult differential equation

I've the following DE, describing a physical phenomenon. And the prupose is to solve that DE using Mathematica $$x(t)\cdot r+x'(t)\cdot l+a\cdot\ln\left(1+\frac{x(t)}{b}\right)=0\space\...
2
votes
1answer
125 views

How to solve differential equation with absolute value?

I'm a newbie here, I want to solve this equation for my assignment: mg - c x'[t] Abs[x'[t]] = m x''[t] I'm using ...