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.

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
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 ...
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 ...
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 ...
8
votes
3answers
448 views

Solving a differential equation involving the square of the derivative

I want to solve the differential equation $$\left( \frac{dr}{d\lambda} \right)^2 = 1-\frac{L^2}{r^2} \left( 1-\frac{1}{r} \right)$$ where $L$ is some parameter. The behavior I am looking for is when $...
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 ...
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, $$\...
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 ...
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: ...
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{\...
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: ...
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:...
-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
1answer
133 views

why this PDE causes internal 1/0 division?

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

Unsure solution of ODE with DiracDelta function

Could the following solution be treated as reliable? DSolve[{D[x[t], t] == x[t]^3*DiracDelta[t - 2], x[1] == 1}, x[t], t] DSolve::bvnul: For some branches of ...
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
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
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
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 ...
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 ...
5
votes
1answer
157 views

Compiling FoldList implementation for RK4

Original I'm looking to write an integrator for a function of two variables. Here is my implementation for the RK4 update rule using FoldList. ...
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). ...
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: ...
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 ...
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 ...
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
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
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 ...
0
votes
1answer
186 views

Solving Differential Equation System for HIV Treatment Model

I was working on a project about optimal strategies for HIV treatment, models used from [Butler, Kirschner, and Lenhart] 1997. This model explains the spread of HIV viruses in the human body, where ...
4
votes
0answers
176 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 ...
4
votes
2answers
224 views

Solving a nonlinear system of ODE with DSolve

I have been trying to solve the following system of ODE with initial values using the function DSolve. My code is : ...
-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 ...
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 ...
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...
4
votes
1answer
584 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 ...
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
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}{\...
6
votes
2answers
212 views

Trying to find a temperature profile with a nonlinear 2nd order ODE. NDSolve very sensitive to seemingly arbitrary constant

I am trying to solve this differential equation for a heat transfer problem: \begin{equation} kt\frac{\partial^2 T}{\partial x^2} = \epsilon \sigma T^4, \ \ \ T(0) = T_0, \ \ \ \frac{\partial T}{\...
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
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 <...
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
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
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. ...
4
votes
0answers
143 views

How to find an exact solution to this ODE?

I am trying to find an exact solution to this differential equation, ode = f'''[x] + f[x]*f''[x] - f'[x]^2 == 0 For which, I already know the exact solution ...
4
votes
3answers
853 views

How can I solve a nonlinear ODE

How do I solve the following ODE in Mathematica? DSolve[x''[t] + x[t]^2 + x[t] == 0, x[t], t] Such that the answer is as shown: Instead this function gives a <...