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
23 views

Analyitic and numerical solutions plots of PDE are different!

I solved the following heat equation PDE analytically by hand and also Maple the solutions were the same. Also, I solved the PDE numerically using Maple. But the analytic solution and numerical ...
1
vote
1answer
56 views

How to solve this 1st-order linear ODE system

Consider an ODE eigensystem $$ ty\,a(y)+[(q+\frac{y+1}{2})+(y\partial_y+\frac{1}{2})]b(y)=\lambda a(y)\\ ty\,b(y)+[(q+\frac{y+1}{2})-(y\partial_y+\frac{1}{2})]a(y)=\lambda b(y) $$ where $q,t$ are (...
0
votes
1answer
73 views

How to resolve the fail when applying a user-defined solver?

The user-defined function pdetoode and pdetoae, developed by @xzczd, is very useful to deal with a PDE system when there is ...
2
votes
1answer
42 views

Numerically solving a system of ODEs where the functions are vectorized

I am attempting to solve a system of ODEs where a, b, cv1 and ...
1
vote
1answer
91 views

Interpreting Mathematica code on black holes

I am trying to understand the code written down on page 7 of this document (code is in Mathematica) I understand pretty much all of the code on the previous page needed to setup the page 7 code (...
0
votes
1answer
42 views

DSolve error — fewer dependent variables than equations

I try to solve this equation: And I got an answer: DSolve[k'[t] == s k[t]^a - (n + b) k[t], k[t], t] {{k[t] -> E^(-6 t) C[1]}} But now I try this: ...
2
votes
1answer
91 views

How to solve this 2nd-order ODE with quadratic coefficients?

Consider an ODE eigensystem $$ \begin{bmatrix} 0 & d_1-\mathrm id_2 \\ d_1+\mathrm id_2 & 0 \end{bmatrix} \begin{bmatrix} a(y) \\ b(y) \end{bmatrix} = \lambda \begin{bmatrix} a(y) \\ b(...
0
votes
0answers
45 views

DSolve Recursion Limit Error [on hold]

Cannot get DSolve, Simplify, or anything else to work. This is all the information our textbook gives us for the problem, but the second image is from an example problem from the book and I typed it ...
0
votes
0answers
71 views

Solving a differo-integral equation [duplicate]

I've the following equation for x(t): $$x'(t)\cdot\text{a}+\text{b}\cdot\frac{x'(t)}{x(t)+\text{c}}+\frac{\partial}{\partial t}\left\{\int_0^tx(\tau)\cdot\mathcal{...
0
votes
0answers
48 views

Are the following Mathematica codes correct for solving wave equation PDE? [duplicate]

I wanna solve the following PDE of wave equation using Mathematica. $u_{tt}=u_{xx}$ $0<x<\pi , t>0$ Initial Conditions: $\begin{cases}u(x,0)=sin(x) \\u_{t}(x,0)=1\end{cases}$ Boundary ...
2
votes
0answers
31 views

How to use DirichletCondition with DSolve and not just NDSolveValue?

I know one can use Region and DirichletCondition with NDSolveValue. But I do not know why it ...
-2
votes
2answers
58 views

Solving a 2nd-order nonlinear differential equation [on hold]

My equation is [{x[t]*x'[t])'-(F/m)+(b/m)*x(t)*x'(t)==0},x(0)=0,x'(0)=0] It is a form of Newtons momentum equation, but I am having a lot of trouble solving this ...
1
vote
1answer
52 views

Singularities forming on boundary while solving system of pde's

This is a follow up of a previous question I asked regarding solving a system of coupled, non-linear partial differential equations, 2D spatially + time. The equations (shown below) model a magnetic ...
3
votes
0answers
77 views

Laplace equation for a trapezoidal domain

I want to solve Laplace equation over a Isosceles trapezoidal domain. I need an analytical solution . would you please guide me writing the code in mathematica. how to add the boundary conditions ...
1
vote
2answers
86 views

Validating a solution for a differential equation with DiracDelta

For the following differential equation $\displaystyle-\frac{\partial ^2\phi2 (x)}{\partial x^2}+\lambda ~[\phi2 (x)]^3-\mu ^2~\phi2 (x)=\phi2(x)~\delta(x)$ ...
6
votes
4answers
307 views

What is wrong with my approach to solving a heat transfer PDE?

I wanna solve the following heat transfer PDE using Mathematica. $\qquad u_{xx}=u_{t}$ with following conditions: $\qquad \begin{cases}u(x,0)=sin(x) &0<x<\pi &,t>0\\u_{x}(0,t)=1\\...
3
votes
2answers
141 views

Solution or artifact?

I am trying to increase the precision of the code ...
0
votes
2answers
66 views

Correct interpretation of an ODE solution

I am not very good with Mathematica but I am trying to solve the following initial value problem $y''(t)=\lambda_1 y'(t)e^{y(t)}+ \lambda_2 y'(t)e^{-y(t)},$ $ y(0)=0$ I have tried first the ...
0
votes
0answers
50 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
74 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
26 views
1
vote
2answers
71 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
37 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
97 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 ...
1
vote
1answer
54 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 ...
2
votes
1answer
85 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 ...
3
votes
2answers
157 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, $$\...
5
votes
1answer
113 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
51 views

Protected tag error using NDsolve [closed]

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
649 views

Mathematica gives an unexpected answer for Integrate [closed]

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
53 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
81 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
81 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
35 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
101 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
59 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
136 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
84 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
58 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
57 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
57 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
136 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
49 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
40 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
94 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
110 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 ...