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
6
votes
1answer
169 views

1D-waveequation with absorbing boundary condition: FEM solution?

I try to simulate the special absorbing(?) boundary condition `Derivative[1, 0][y][1, t] + Derivative[0, 1 ][y][1, t] == 0` which only allows energy flow in ...
0
votes
0answers
57 views

Exclude a term in a differential equation

How can I exclude this term (The red box) from derivation to make it consider it as a constant (Just a constant to be multiplied ), I am getting the differentiation for the whole equation but I want a ...
0
votes
0answers
95 views

Avoiding instability and missing boundary condition errors when solving a system of 3 differential equations

I am trying to solve this system of equations: dw(v,t)/dt =2g(v,t) w(t,v) g(t,v)= Pi/2 (v^2)d g0(v,t)/dt d go(v,t)/dt + d/dv[dw/dt *1/v^3)]=0 with initial ...
2
votes
1answer
108 views

Functions can graph but can't solve for partial derivatives

First I got a function g[xo,yo] by solving a system of partial differential equations ...
2
votes
1answer
100 views

Solving boundary value problem with coupled odes at interface

I am trying to get the eigenvalues of the following differential system ...
13
votes
0answers
226 views

3D stable fluids algorithm to simulate transition from laminar to turbulent flow

This algorithm is 3D extension of our 2D algorithm published on this page and here. We suppose that with this code we can simulate transition from laminar to turbulent flow. In this example we compute ...
5
votes
2answers
518 views

Numerical solutions of active 1D wave equations

I would like to solve the following PDE with finite difference method. The PDE is from the following paper, (https://arxiv.org/pdf/1911.11823.pdf). I would like to implement the algorithm for the left ...
1
vote
2answers
89 views

Heun functions and boundary conditions

Using the Mathematica Heun functions, is there are simple way to get the solution of the same equation satisfied by HeunG[z], but with the boundary condition $f(z=0)...
2
votes
1answer
119 views

exact solution for first-order nonlinear ordinary differential equation [closed]

I was trying to solve this non-linear first ODE ...
0
votes
0answers
63 views

NDSolve throws Dot::dotsh error

First, NDSolve is an incredible tool. I've been pushing it hard. Second, this error arises because I don't fully understand how best to handle the singularities. Third, I share this because This ...
0
votes
0answers
55 views

Error: "The function appears with no arguments" Trouble trying to solve differential equations?

I am trying to compute the following system of differential equations: ...
0
votes
0answers
50 views

Manipulating matrices obtained by NDSolve

For example, Matrix U is obtained by ...
10
votes
3answers
241 views

Can't solve with NDSolve a simple circuit with a lossless transmission line (a wave equation)

My question Consider the following circuit. A lossless long transmission lines ($R' = G' = 0 \text{ } \Omega$), of length $\ell$ and inductance per unit length $L'$ and capacitance per unit length $C'$...
4
votes
2answers
63 views

Defining variable start position with ParametricNDSolve

I would like to have a variable start point for my initial conditions in ParametricNDSolve. I was hoping ideally this would look like the following (with a random ...
3
votes
2answers
143 views

BEYOND Singularity with NDSolve

Here is the code I want to numerically integrate my nonlinear ODE" ...
2
votes
1answer
67 views

Fitting data to a system of ODE

I have a system of two ODEs depending on two parameter k,h and I want to find the best k,h to fit some data. To understand if my code works I started generating some fake data from the equations. Here ...
0
votes
0answers
30 views

Boundary conditions are not satisfied after application of an interpolating function

I have a little question about boundaries conditions. I solved a differential equation and these are x-dependent functions. They are classified using two indices (i,j) like: ...
0
votes
0answers
57 views

Assistance with NDSolve error "At \[Tau] == 6.656861910808319`, step size is effectively zero; \ singularity or stiff system suspected"

I have been trying to simulate a nanocontinuum whose interaction is described by the modified Lennard-Jones potential. All of my other simulations worked perfectly, but I got stuck when I introduced a ...
0
votes
0answers
44 views

Two functions are the same but the code works with one and not the other

I have been trying to solve this problem for a while but I honestly don't understand what is happening. Do I have defined the same function in two different ways: one of them is hardcoded, and the ...
1
vote
1answer
85 views

Integrating elements of a matrix obtained by NDSolve [closed]

the matrix U[t] is obtained by U[w1_,w2_,w3_,t_]:=NDSolveValue[u'[x]==-I*H[w1,w2,w3,x]*u[x],u[0]==IdentityMatrix[3],u,{x,0,Pi}][t] where H[w1,w2,w3,x] may be ...
0
votes
0answers
39 views

1D wave equation: Numerical approximation of GreenFunction (MethodOfLines)

Trying to find a numerical approximation "GreenFunction of the waveequation" ('GreenFunction` doesn't evaluate) Mathematica "MethodOfLines" won't evaluate: With ...
1
vote
0answers
53 views

numerical solving nonlocal drift-diffusion equation mathematica

I am trying to numerically solve the following system: Let $f:=f(x,t):[0,100]\times \mathbb{R}^+\to \mathbb{R}$ solve $\partial_t f(x,t) + u(x,t)\partial_x f(x,t) = (\partial_x^2 - \frac{1}{x} \...
1
vote
1answer
130 views

Draw phase portrait with StreamPlot on a sphere [closed]

I would like to draw this phase portrait using StreamPlot on sphere as in this picture like that In fact, i have seen this for the classical pendulum defined by ...
2
votes
0answers
109 views

Solving Delay PDE

I'm trying to numerically solve the following delay PDE: $$ \frac{\partial}{\partial t} f(x,t) = \int_{x+1}^\infty f(y, t) \hspace{0.2em} dy $$ given the initial conditions $$ f(x,0) = 0, \...
2
votes
1answer
91 views

Making use of side effects to speed up NDSolve

I am solving NDSolveValue[eqs, {A, B}, {t, 0, 1}] a system of matrix differential equations ...
0
votes
1answer
86 views
1
vote
1answer
84 views

Plot a function inside of another function [closed]

I want to plot y[x] vs. x[t]: ...
1
vote
1answer
81 views

Passing RootSearch through NIntegrate?

I am trying to integrate a function that is itself a function of RootSearch (from the Wolfram Library Archive). Specifically, for a given value of parameter ...
7
votes
3answers
171 views

Integrating a ParametricNDSolve solution whose initial conditions are determined by another ParametricNDSolve function?

I am trying integrate a ParametricNDSolve output (System2) whose initial conditions vary according to another ParametricNDSolve function (System1). The code I have so far is as follows. ...
2
votes
2answers
182 views

Plotting an Expression that is a Summation in Mathematica

I was solving the Helmholtz equation using Mathematica and got as an output an expression which is a summation. I first want to turn this expression into a function of $x$ and $y$. I then want to use ...
4
votes
1answer
169 views

Different results from NDSolve of v9 and v11

When using NDSolve to solve 2 pdes with different version of Mathematica, I obtained totally different results. The code is as follows. ...
1
vote
2answers
41 views

Plotting an oscillating function on Mathematica [closed]

Hey I'm trying to make a phase space plot of an oscillator's position over a period of cycles and whenever I go to enter in my plot function there is no error returned but I'm presented with a blank ...
6
votes
0answers
90 views

GreenFunction for Helmholtz equation in arbitrary Rectangle region doesn't evaluate

Here is a basic example found in the documentation of GreenFunction: ...
1
vote
0answers
57 views

DSolve for large nearly sparse matrix

The following code creates a system of first order linear homogeneous differential equations and attempts to solve them. The time needed scales as the 4th power of the matrix size. Is there an ...
1
vote
1answer
45 views

How to manipulate variables of a solution given by DSolve?

I have a set of coupled differential equations which I would like to use its solution to plot a function. I already have obtained the desired plot but I want to improve it a little. I would like to be ...
0
votes
1answer
46 views

Coupled equations to find the best parameter

I have a coupled equation I would like to plot them with different values of the parameter $m$ to find for which $m$ it has my favorite answer: ...
4
votes
2answers
176 views

question on documentation convention for heat PDE used by Finite Elements methods in Mathematica

Why FEM documentation says heat PDE is second order in time? This makes it looking same as the wave PDE. Is this meant to be that $m=0$ for the heat pde? But this looks confusing. Could this be just ...
2
votes
1answer
121 views

Using DSolveValue to get Analytic Solution to the Helmholtz Equation

I am trying to get Mathematica to verify my analytic solution to the following problem: $$ \Delta u + u = 0 \quad\quad\text{on }\ D=[-3,3]\times[-3,3] $$ $$ u(x,y) = \sin(\frac{\pi x}{6}) \quad\quad\...
6
votes
1answer
242 views

NDSolve solutions for modeling convection-coupled melting

I am trying to solve the convection-coupled melting benchmark in MMA 12.3 as presented in FEniCS/03-ConvectionCoupledMelting-MixedElement-AMR.ipynb. This model in MMA is based on the solution from ...
5
votes
1answer
91 views

On the quotation mark around Method option in NDSolve

I note that in the documents about NDSolve or its variants, the main Method option has no quotation mark while its sub-...
2
votes
2answers
81 views

Plotting NDSolve solutions for an ODE with a variable parameter

Quick question! I'm supposed to plot solution curves for the ODE y'(t)+nty(t) = 0, y(0) = 3 with integer n varying from 1 to 6 inclusive. In the process, I have to use interpolated functions obtained ...
2
votes
3answers
136 views

Normalizing singularities in NDSolve

I've tried to create the following example. Suppose that I have the differential equation: $$ U''(x) = \frac{U'(x) - U(x)}{x}, $$ which I know 1 boundary condition and know that this function should ...
8
votes
0answers
188 views

Shortest Distance between two points on a 2D surface

I am working on an interesting problem, that consists of trying to compute the shortest distance between two points on a 2D surface. This 2D surface can be represented in a 3D space by the function $f(...
6
votes
2answers
288 views

Solving a Cauchy problem related to the pendulum

One end of a thread of length l = 1m is fixed, and a body of m = 1 kg is attached to the other end. The body is displaced counterclockwise by 30 degrees and then released. Plot the resulting Phi(t) ...
-2
votes
1answer
77 views

Mathematica 12.0 Dsolve solving 2D diffusion PDE

my friends,i meet some problems,please help me! this is my equation and ic ,bc this is my code .I let some constants R,in,D,F become 1,h become 2,it is convenient to calculate ...
4
votes
1answer
159 views

Stability analysis of coupled ODE's

I'd like to reproduce Panel A of Figure 7 (red curve) of this paper, which represents the steady-state solutions of four coupled ODE's, and verify this claim that the diagonal branch in the Z-shape ...
1
vote
2answers
63 views

Plot with Dsolve

I am trying to plot the solution to the Dolve at a position /. x -> 0 ...
1
vote
1answer
38 views

Discrete Variables cause Step Size Not Real Error in NDSolve

I have, until recently, had great success using discrete variables to manage local changes in the definitions of the derivatives with NDSolve. Now, for reasons I don't entirely understand, this ...
0
votes
0answers
66 views

FindRoot doesn't find root

I am facing a problem that my FindRoot doesn't find the actual roots. I am trying to make a loop that iterates my parameter sets (U0,X0,\Sigma0) to find sets that satisfy some conditions. Here is my ...