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.

1
vote
1answer
107 views

How can solve this partial differential equation (PDE) and plot?

How can plot and solve this partial differential equation in mathematica? $$ K \frac{\partial^2 T}{\partial x^2}- h (T-T_m) = \frac{\partial T}{\partial t} $$ $ Tm = 25 $ $ k= 47 $ $ h= 1.5 $ ...
2
votes
2answers
50 views

How to plot Implicit function Exp^(-ArcTan[y/x]) * Sqrt[x^2 + y^2]==C , for example, C -> Range[-12, 12]?

I tried many functions to plot implicit function: Exp[-ArcTan[y/x]] * Sqrt[x^2 + y^2]==C Does anyone have an idea how to do that ? (This is General Integral of ...
2
votes
1answer
91 views

Why can't DSolve solve this simple system of PDEs?

I have a system of two PDEs: $$\frac{\partial\psi}{\partial y}=ax+b$$ $$-\frac{\partial\psi}{\partial x}=-ay+cx$$ where $a$, $b$, and $c$ are constant reals. When I plug the system into ...
3
votes
1answer
100 views

Any idea? why NDSolve is very slow for a very small digraph

I have developed (of course with a lot of help from experts in this forum) the following code to speed up the calculations for large digraphs. However, I ended up ...
3
votes
2answers
98 views

Convergence of PDE solution using method of lines

I'm afraid that this will turn more into a math question rather than a Mathematica one. I'm trying to solve the equation $$\frac {\partial n}{\partial t}=D\frac {\partial^2n}{\partial x^2}$$ $$\...
6
votes
2answers
342 views

Solving Stefan's solidification problem - for the case of 3 regions

This question heavily related to this question, where the case of two PDE's are solved along with a zipping condition that is a function of time. Using the link in the code I have solved this set of ...
0
votes
0answers
27 views

Ordering the terms of a differential equation, individual output form

I am trying to change the output format of a second order differential equation. Mathematica puts the x[t] terms and its derivatives in an ascending order like <...
1
vote
0answers
43 views

How to find x for certain y from InterpolatingFunction [duplicate]

As shown in the picture, I get the data after using NDSolve. Now I want to get the x for cetain y, how can I do this? The last three lines is the way I try to ...
2
votes
2answers
118 views

Newbie PDE Question

I downloaded Mathematica trial in order to try to solve a PDE that Matlab symbolic couldn't handle. I don't know all the bells and whistles but going along with online documentation. I am trying to ...
0
votes
1answer
75 views

Is it possible to find the equation of motion of a spring-mass system using differential equations as input?

I am searching for a solution the check the validity of my calculations on standard dynamics problems. Basic mechanical engineering environment, systems containing movable masses connected to each ...
2
votes
2answers
79 views

Spinning top: how to plot position on a sphere?

I am modelling a spinning top on a sphere and I want to obtain plots such as these I have solved the equations of motion ...
5
votes
2answers
192 views

Black hole orbit in Mathematica

I am currently investigating the motion of a particle around a black hole. The Lagrangian for the system is $$ \mathcal{L}=F(r)\dot{t}^2-\frac{\dot{r}^2}{F(r)}-(r\dot{\phi})^2 $$ Where $ F(r) = 1 - ...
2
votes
0answers
47 views

Solving Stefan's solidification problem - moving boundary issue [duplicate]

I have used the (amazing) work done by @xzczd In this question: How to solve a system of PDEs with zip condition? in order to solve a similar problem. I ran into a problem to define S(0)=0 (same as ...
0
votes
1answer
59 views

How to solve a matrix $ Ax=0 $, where matrix $ A $ is a function of $ ω^2 $ [closed]

I have a matrix $ A $ which depends on $ ω^2 $. I wanted to solve for $ ω $. The usual procedure is taking the Det[A] and equate to zero and solve for it. How can I ...
3
votes
2answers
160 views

Plotting the bifurcation diagram for $\dot\theta=\frac{\sin(\theta)}{\mu+\cos(\theta)}$

On this site I have found many bifurcation algorithms which work exceptionally well for many cases, but for the following differential equation, they do not seem to work: $$\dot\theta=\frac{\sin(\...
5
votes
1answer
128 views

Driving a system of differential equations with an AR1-Process

I have the following system of differential equations: ...
3
votes
1answer
83 views

Problem involving a system of nonlinear coupled ODE's with adjustable boundary

The problem is to solve the following system ODEs: I. $\ \ \ \ \ \ \ \dfrac{4}{r}[1+a(r)]\left(\dfrac{dH}{dr}\right)^2+\dfrac{dG}{dr}=0$ II. $\ \ \ \ \dfrac{1}{r}\left(\dfrac{dA}{dr}\right)+f(r)+k^...
2
votes
1answer
84 views

Specifying boundary conditions at $\infty$

I am trying to solve the coupled Ekman layer solutions numerically, but I am not sure how to enter the boundary conditions or begin to define the equations and write my code. These are my equations ...
1
vote
2answers
73 views

Solving an ODE with a sign/step function which depends on the time derivative

I'm trying to solve a set of ODEs with a Heaviside step function which depends on the sign of the derivative of the function. This is a simplifying example of what I'm trying to do ...
2
votes
1answer
41 views

Implement NDSolve when I have a very efficient way to compute the right-hand-sides of my coupled ODEs

I am trying speed up NDSolve on a set of coupled non-linear second-order ODEs. ...
1
vote
1answer
75 views

NDEigensystem to find eigenvalues and eigenfunctions of coupled differential equations:

I would like to numerically solve the following system of coupled differential equations: ...
5
votes
1answer
129 views

Imposing boundary condition and normalization on an ODE

I want to use DSolve to solve a differential equation while imposing a boundary condition and normalization. How can I do that? Let's take for example a simple ...
-1
votes
1answer
80 views

How can I solve this systems of differential equation and show a plot?

$$ \frac{\mathrm du}{\mathrm dt} = 1 - u \mathrm e^{\epsilon(8q-1)} $$ $$ \frac{\mathrm dq}{\mathrm dt} = u \mathrm e^{\epsilon (q-1)} - q $$ $ 0 \leq \epsilon \leq 0.1 $ $u(0) = 0$ and $ q(0)=0$ ...
0
votes
0answers
55 views

NDEigensystem boundary conditions

I am attempting to solve the Schrodinger 1-D time independent equation for the eigenfunctions and eigen-energies of the piecewise potential described in the attached image of my code. I need to ...
0
votes
1answer
48 views

How to Solve second order Differential Equation with two parts [closed]

I'm trying to solve this two equations togather x''[t]+ a^2 x[t]=0 ; (x'[t])^2+ b^2 (x[t])^2=0 I wrote this code but is not working ...
1
vote
1answer
99 views

Not getting the correct domain for an ODE [closed]

I want to find the domain of the the ODE $y\,= (y \operatorname{Ln} (y))/x$ and visualize it. A = FunctionDomain[(y Log[y])/x, {x, y}] ...
9
votes
1answer
284 views

Why does NDSolve fail to solve the PDEs?

I try to solve two coupled PDEs with NDSolve using the following code: Set two operators: ...
0
votes
1answer
47 views

Trying to evaluate NDSolve inside of FindRoot

I want to find the equation for the range of a projectile as a function of its elevation angle at launch. Currently, I am stuck in my effort to calculate the time. What I have doesn't work right ...
2
votes
2answers
87 views

Debugging NDSolve to see numerical values at each time-step

I wish to debug my NDSolve function and this is my first time using the Mathematica debugger. I have read around and attempted various different ways of debugging but I cannot figure it out. I want to ...
0
votes
1answer
76 views

Randomizing Initial Conditions of NDSolve Differential Equation Phase Space Plots with Looping Structures

I am looking for a way to randomize the initial conditions on the numerical approximation for the angular displacement of a plane pendulum. I have been trying for hours, and believe a For loop is ...
1
vote
1answer
69 views

Is there a way to automate this procedure?

I have some code which numerically solves a differential equation for a given value of the parameter $M0$ and for some initial conditions. The initial conditions will remain fixed throughout the ...
0
votes
1answer
49 views

Symmetric solution of ODE

Is it possible to force DSolve to calculate the symmetric solution? Obviously the ode x''[t] + x[t] == 0 has the symmetric solution ...
3
votes
1answer
124 views

Generate a smooth random function (2D curve) with endpoints specification?

Here is a PDE example, adapted from Wolfram Documentation: ...
5
votes
2answers
569 views

Why Can't `DSolve` Find a Solution for this ODE with y[-x]

I wanted to find a accuracy solution of the following ODE. $$y'(x)+y(x)=-y(-x).$$ But when I try to use DSolve as follows ...
2
votes
1answer
135 views

How to obtain the solution of an ODE in implicit form?

I want to get the general solution of a first-order ODE in implicit form. It should be something like this: With input y'[x] == 1, the desired output is ...
1
vote
2answers
77 views

solving sets of partial Differential equations

Considering two functions $\psi_{1}(u,v)$ and $\psi_{4}(u,v)$. we have these two parial differential equation for them $(-2 i Sech[\frac{u}{\alpha}] \frac{\partial\psi_{4}}{\partial u}+2 i Sech[\...
5
votes
1answer
166 views

Solve PDEs with finite difference scheme by modifying NDSolve-based solver

Motivation As discussed here, NDSolve uses different difference orders for various spatial derivatives and the implicit design could cause trouble in certain cases....
3
votes
2answers
80 views

Using NDSolve with conditional expression

I am trying to solve the 2nd order ODE for a harmonic oscillator under the influence of a harmonic restoring force, a sliding friction force, and a static friction force. My equations are below: $$ x'...
0
votes
0answers
35 views

Differential equation and equation with parameter

I have the equations x[t] == Exp[m t] && (2 t + 1) x''[t] + 2 (2 t - 1) x'[t] - 8 x[t] == 0 Please tell me which function to use to solve it and find the ...
1
vote
1answer
105 views

Having trouble working with two mass, three spring dynamic system

I am following a dynamic analysis example https://www.math24.net/mass-spring-system/ and trying to implement it in Mathematica. However, I am having trouble even getting simple properties like the ...
0
votes
1answer
120 views

Solve a Second-Order Differential Equation Numerically, with boundary conditions?

Below is an ODE with BC define as x[R]=0, x'[0]=0, x'[R]=0 and parameter n. The ODE is stiff at certain data, and I need to see the behavior of x' and x for given ...
1
vote
1answer
88 views

PDE in 3D: Specification boundary condition at infinity

I'm trying to solve the Schrodinger equation and having difficulties to define a limitless region because the problem has the Dirichlet conditions at infinity. Maybe I don't need such a region and ...
-1
votes
1answer
79 views

Elliptical orbit simulation [closed]

I want to plot the full orbit ellipse. ...
0
votes
2answers
109 views

How can I know how many points are used to by the interpolating function returned by NDSolve?

In a problem in which the solution has oscillations that I solved, the amplitude of the oscillations is much lower than I expected. It looks as if the interpolating function doesn't use enough points ...
1
vote
1answer
126 views

Solving the Dirac equation in an arbitrary metric [closed]

I want to solve Dirac equation in a metric like $ds^2=g(u,v)\,du\,dv$. The relations of $u$ and $v$ with Minkowski coordinates $t$ and $x$ are given by functions $A$ and $B$, $t=A(u,v)$ and $x=B(u,v)$....
0
votes
0answers
32 views

DSolve ordinary differential equation initial conditions not working 11.2

I have a differential equation that I want solved using initial conditions. The differential equation is: DSolve[{y''[x] == (g (A*y[x]*p - m))/m}, y[x], x] ...
6
votes
2answers
153 views

Switched linear systems

I'm curious whether it is possible to solve switched linear systems within the framework of NDSolve. For example a system of linear ode's like $$x'(t) = \left\{\...
2
votes
1answer
111 views

Analyze stability of equilibria using Routh-Hurwitz conditions

For an assignment, I need to analyze the stability of a system very close to equilibrium, using "Routh-Hurwitz conditions". I have already obtained the characteristic equation of my system, but I do ...