The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
2
votes
1answer
63 views

Cross coupling in DirichletCondition not supported — conflict with documentation?

Mathematica 12.0.0.0 happily solves the trivial coupled differential system as follows: ...
1
vote
0answers
36 views

InverseFourierTransform takes me forever

I am trying to solve complicated PDEs using FourierTransfrom and InverseFourierTransform on Mathematica 12.0, but the code below does not give me a result. I do not get any error messages but the ...
10
votes
2answers
307 views

Solving Cahn-Hilliard equation: LinearSolve: Linear equation encountered that has no solution

I have built the Cahn-Hilliard Eqs. in MMA (Mixed Formulation, second order), However, it doesnot work in MMA using Finite Element. LinearSolve: Linear equation encountered that has no solution. And ...
8
votes
1answer
79 views

Can we construct our own NDSolve`StateData?

NDSolve can be broken into three stages: NDSolve`ProcessEquations processes the equations and sets up an NDSolve`StateData ...
0
votes
0answers
124 views

Constant positive and negative Gaussian curvature $K$ meridians as orthogonal trajectories

The plot code below depicts two point through which profiles of constant $K$ are drawn positive and negative. ...
3
votes
1answer
99 views

Reconstructing a function from its gradients

I have a list of the components of the gradients, $\partial f/\partial x_i$, of a function $f(x_1,x_2,\cdots)$. Is there some neat way to reconstruct the function $f$? One approach to doing this ...
1
vote
1answer
73 views

WhenEvent error in NDSolve ODEs

I wish to change the term, T'[t] to 0 when S[t]<=0 when I solve ODEs. I have used WhenEvent in my NDSolve part, but it seems not work. The code is ...
6
votes
1answer
325 views

Solving PDE with unreasonable results

I have a simplified version of my chemical reaction problem. Basically it solves the concentration (ca) and grain (g2) diameter. The ca function is depended on particle diameter R, while g2 function ...
3
votes
1answer
80 views

Solve 1D Wave Equation

I wanna model 1D wave equation and plot it, Here is my try so far, ...
1
vote
0answers
40 views

Manipulating a ParametricFunction to handle units

I have a pretty nice way to handle units on a result from NDSolve, which basically consists of converting all of the units to SI, stripping them, calling NDSolve, and then putting the units back. I'll ...
4
votes
1answer
98 views

Line-Dirichlet Boundary NDSolve

I have defined such a Dirichlet boundary conditions which fixes the nodes in a line, however, the results show that only two nodes are fixed, not the nodes in a line, Code: ...
0
votes
0answers
42 views

DSolve Varying Base on Implementation

I am trying to understand the behavior of a system of equations that is derived from: ...
2
votes
3answers
92 views
1
vote
0answers
45 views

Problem with module for solving wave equation

Im really new to mathematica and trying to solve a homogeneous wave equation numericallly. I wrote a module for it and wanted to test it but it only returns my input. ...
3
votes
1answer
59 views

Solve and plot PDE on restricted domain

I want Mathematica to solve (I used a picture since when I use mathjax code the editor here says I might be using wrongly formatted code...) So far, I have ...
2
votes
0answers
43 views

Error in PDE: Length of Derivative operator

I am trying to solve Poisson's equation in a cylinder with Dirichlet boundary conditions for the top, bottom, and sides of the cylinder, but I am getting the following error from NDSolve: ...
1
vote
1answer
105 views

Solving a nonlinear PDE

I'd like to know the asymptotic ($ t\to\infty $) behavior of $$ \partial_tu = -y\partial_{y}u + x^2 + y x \partial_xu - (1 + \partial_xu)^2 $$ with $ u(0, x, y) = 0 $. ...
2
votes
1answer
36 views

NDSolve error with manipulate for 2 coupled ODEs

While trying to solve a system of coupled ODEs (for EVE[t] and FTZ[t]) with Manipulate, I ...
1
vote
0answers
110 views

PeriodicBoundaryConditions an a square

I hope the answer is simple, but I can't see the solution: I want to solve a PDE for u[x,y] under Periodic boundary conditions on say a square size 10 x 10. I.e. <...
4
votes
1answer
139 views

Wave equation: Understanding PeriodicBoundaryCondition

Inspired by the interesting question 202542 I try to solve the wave equation with coupled boundary conditions u[x,t==1 ]==u[x,t==x/2] I tried ...
0
votes
1answer
181 views

Fourier Collocation For Heat Equation [closed]

In fact My problem is this $$\frac{\partial u}{\partial t}+\ sin(y)\frac{\partial u}{\partial x}=\nu(\frac{\partial^2 u}{\partial x^2} +\frac{\partial^2 u}{\partial y^2})$$ But I wanted to test the ...
2
votes
1answer
70 views

Contour Plot of system of differential equation

I am trying to find the fixed points and plot the nullcline/contourplot for the system below, but I get conditional cases $$\frac{d\theta_1}{dt}= K sin(\theta_1 - \theta_2) - sin(\theta_1)$$ $$\frac{...
3
votes
2answers
219 views

Solution or artifact?

I am trying to increase the precision of the code ...
2
votes
1answer
98 views

Solving Poisson's equation with two Dirac delta potentials

I am trying to solve $\nabla^{2}\phi(x,y)=V_{0}(\delta(x-a,0)-\delta(x+a,0))$ with boundary conditions $\phi(x=0,y)=0, \phi(x=b,y)=0$. Here $a=1, b=5$. How one can solve it numerically in Mathematica. ...
4
votes
0answers
63 views

ParametricNDSolveValue with SparseArrays

I want to solve large, sparse matrix systems with ParametricNDSolveValue and was hoping to use SparseArray to speed up the computation. However I find that ParametricNDSolveValue doesn't seem to work ...
0
votes
1answer
88 views

Solve PDE using ansatz

I'm trying to find u(x,y) such that $$ 0=-axy+bx^2-cyu_y-du_x^2 $$ using the ansatz $$ u(x,y)=1/2\begin{pmatrix}x \\ y\end{pmatrix}^T\begin{pmatrix} A_{11} &...
0
votes
0answers
47 views

Convert Part of an Expression Using ExpToTrig

I'm wondering if there's a nice way to convert only parts of an expression, say exponential functions of varible $\theta$ to trig. The motivation is best descripbed by the following example. ...
2
votes
1answer
129 views

Problems in running the non-linear PDE system

I'm new to the mathematica and just try to solve an seemingly simply non-lineal coupled PDEs. It is about the diffusion-reaction kinetics in a pellet.The code seems workable, but keep running without ...
0
votes
0answers
40 views

How to time shift x-axis in mathematica simulation?

I have a simulation from a system of equations that runs from 0 to 50 Normal = NDSolve[{A /. Parameter, A[0] == .1}, {A[t]}, {t, 0, 50}]; That produces: Now ...
0
votes
1answer
55 views

Solutions of ODE from Mathematica and Laplace transform differ

The equation is $p'(t)=k_1s_0{e}^{-k_1t}-k_2p(t)$ The solution with Mathematica DSolve[p'[t] == k1*s0*E^(-k1*t) - k2*p[t], p[t], t] $p(t) = -(k_1/(k_1-k_2)) ...
3
votes
0answers
138 views

PDE with strange boundary conditions

What is the right way to solve the following equation from scratch under mathematica: $$\begin{aligned} u_t(t,x)-u_{xx}(t,x)&=f(t,x), &(t,x) &\in (0,1)\times (0,1),\\(u_t(t,x)-u_{x}(t,x))\...
4
votes
1answer
239 views

How to speed up the integral in NDSolve?

On the MMA.SE, there have been several question on how to solve equations including integral using NDSolve, see example 1, example 2, and example 3. Many people, ...
8
votes
0answers
99 views

How to modify NDSolve`StateData without crashing the kernel?

Probably a hard question, but it's better to cry out loud. Reminded by Chris K, I noticed my fix function has been broken since v11.3. After some checking, I ...
18
votes
2answers
682 views

NDSolve uses different difference order for different spatial derivative when solving PDE

I found something this tutorial for method of line doesn't tell us. Consider the following toy example: ...
1
vote
2answers
57 views

Solving System of Ordinary Differential Equations (ODEs)

When I input the following code to solve this system of equations (I specifically want to look at 0<d<1, 0<q<1, 0<t), I get the error: 'DSolve: The ...
0
votes
0answers
34 views

Issue with Manipulate (in order to fit) of complicated Parametric NDSolve

So I have a quite complicated ParametricNDSolve : ...
1
vote
2answers
77 views

DSolve of second order DE results in InverseFunction

As a result of evaluating DSolve[a''[t] a[t] - (1 - C) a'[t]^2 + (Cc - C L/3) a[t]^2 + (C - 1) k/2 == 0, a[t], t] I got an ...
6
votes
0answers
164 views

Using NDSolve on the Painlevé equations

In an earlier question of mine, I was looking for a way to handle certain kinds of singularities (poles) when using NDSolve. Michael E2's answer, which relied on ...
7
votes
0answers
89 views

DSolve fails with four variables

How is that DSolve has no trouble solving this: DSolve[{ D[G[x1,x2,x3],x1]==0, D[G[x1,x2,x3],x2]==0, D[G[x1,x2,x3],x3]==0 },G[x1,x2,x3],{x1,x2,x3}] but it fails ...
0
votes
1answer
59 views

NDSolve for f[t,s], with initial condition f[s,s]==1

I try to solve integro-differential equation for a function of two variables, where the initial conditions are given with f[s,s]==1. Mathematica does not like such an initial condition, as I get an ...
1
vote
1answer
58 views

Solve coupled PDEs: boundary conditions problem

I need to solve 4 coupled PDEs. Thanks to @xzczd's help, a few days ago I can obtain the solution of the first 2 equations with some proper boundary conditions, see this post. Now, these two equations ...
10
votes
1answer
493 views

Why does NDSolve fail to solve the PDEs and spit out mconly warning?

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

The vectorfield for nonauntonomous system?

The model is a nonautonomous system $x'=(2+cos(2 π t))x -0.5 x^2-0.5$ and it can be transformed to the autonomous form by ...
3
votes
0answers
80 views

How to use an interpolating function as an intial condition for a PDE? [closed]

I want to be able to approximate a PDE, but my eigenfunction is an Interpolating function. Is there a way I can use an interpolating function as an initial condition in the PDE. For Example: ...
5
votes
2answers
120 views

Using NDSolve on wave PDE on string, when solution given at 2 different times instead of initial velocity?

This is a PDE taken from a Maple document. Mathematica DSolve currently unable to solve it. I wanted to verify Maple solution using NDSolve. This is string of length 1, fixed on the left, and free ...
0
votes
0answers
109 views

Is it possible to find the Rössler attractor using only a set of Lyapunov exponents?

Is it possible to use a set of Lyapunov exponents to determine the orbits of the Rössler system? If so, could how would I go about plotting them? EG. Known Unknown
2
votes
1answer
161 views

Plot the solution from DSolve

I'm trying to solve a differential equation as in the following code: FullSimplify[DSolve[x'[t] == a + b E^(g t) + (c + d E^(-g t)) x[t], x[t], t]] which ...
2
votes
1answer
63 views

DSolve yields a strange character K[1]

I'm trying to solve a linear differential equation as in the following code: DSolve[x'[t] == a + b E^(g t) + (c + d E^(-g t)) x[t], x[t], t] which yields ...
5
votes
2answers
166 views

How to get the frequency response with the unstable branches for a nonlinear driven system?

I'm working on a driven system and want to get the amplitude-frequency response curve with an unstable branch just like the following one where the dashed lines correspond to the unstable branches ...
4
votes
2answers
110 views

Automatic solution to label boundary elements with BoundaryMarkerFunction

Preparations Mathematica 11.3, Windows. Let us say I have a rectangular region with 10 little holes inside. Their coordinates are given by positionList. The ...