Stack Exchange Network

Stack Exchange network consists of 175 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
77 views

Numerical integration: gravitational force

What I would like to accomplish is to numerically integrate the following equation: $\nabla^{2}\Phi(r)=\rho(r)$, to get $\nabla\Phi(r)$. $r$ is the radial distance from the origin. Suppressing the $...
5
votes
0answers
145 views

StiffSystem or Singularity - a system of second order ODEs in the problem of geodesics

I would be extremely grateful for any help regarding the following code I wrote and the errors it produces. In this code I am investigating the behaviour of a massive particle trapped in the vicinity ...
0
votes
0answers
41 views

Solving a Laplacian with boundary conditions at infinity

I'm trying to solve a Laplacian given the following boundary conditions: \begin{align*} V(x,y,0) &= 0\\ V(x,y, z \to \infty) &= 0\\ V(x,y, z = \sqrt{a^2-x^2-y^2}) &= 0 \end{align*} ...
9
votes
3answers
306 views

Solving an integro-differential equation with Mathematica

I try to solve a nonlinear integro-differential equation with this code. Here i used a periodic condition. ...
0
votes
2answers
62 views

How can I use the results returned by DSolve in further computations?

As a neophyte, I'm trying to manipulate the result of a differential equation but I have no idea how to do so. Here is the equation: v'[t] + (k v[t]/m) == g I ...
3
votes
1answer
96 views

Why does choosing the method break the parallel computation? [closed]

I have a workable function with using NDSolve with predefined method for solving. But for some reasons I should use the parallel computation. The main problem is that the NDSolve can't build the ...
0
votes
1answer
49 views

NDSolve diffusion equation NDSolve::ndnum

I'm trying to solve a PDE. My code is: ...
2
votes
1answer
95 views

How can I solve these coupled differential equations? [closed]

How do I solve the following system of ODE's? $\qquad \frac{dx}{dt}=\{-(n+1)r_1+(m+1/2)r_2\}x+n\,r_1y$ $\qquad \frac{dy}{dt}=-\{(n\,r_1+(m+1/2)r_2\}y+(n+1)r_1x$
3
votes
2answers
108 views

Not sure how to set up the Laplacian/Poisson Equation

As stated, I am having trouble trying to set up a Laplacian/Poisson Equation. I have boundary conditions with this too, and I've tried using the DirichletCondition function, but I don't know what I'm ...
0
votes
1answer
39 views

Attempting PDE with inequality in boundary condition

I am attempting to solve the equation below, which requires v[y,0]==0 for all y greater than 0. I have followed the /; approach ...
11
votes
3answers
396 views

Minimum energy path of a potential energy surface

I have calculated the energies of a molecule by varying two parameters (Data points are here data). I want to find the minimum energy path from the point (180.0, 179.99, 21.132) to (124.5, 124.49, 0) ...
4
votes
1answer
210 views

How can I get results over the whole domain of my non-linear differential equations?

I want to solve the following system of non-linear differential equations: ...
4
votes
2answers
96 views

Smooth Density Histogram bounded on non-rectangular domain

I'm trying to plot the Smooth Density Histogram of a double pendulum (particularly the location of the bottom pendulum). Since a pendulum has physical constraints, when shown in the Smooth Density ...
0
votes
3answers
33 views

Storing solution of equation and performing operation

I have the following equations which I solve to find a and b. ...
0
votes
1answer
120 views

Numerically solving two coupled nonlinear PDEs

I'm interested in numerically studying vortex solutions to PDEs. By this I mean solutions for PDEs for a field $\theta$ which satisfy $\oint\nabla\theta\cdot d\vec{\ell}=2\pi m$ where $m=...,-2,-1,0,1,...
3
votes
2answers
73 views

How to plot space of bistable solutions?

I have the following ODE system dx1 = -0.7 x1 y2 dy1 = 0.7 x1 y2 + 1.7 (1-x1-y1) y2 - y1 dx2 = -0.7 x2 y1 dy2 = 0.7 x2 y1 + 1.7 (1-x2-y2) y1 - y2 I have found ...
2
votes
1answer
81 views

Access to the temporary solution in NDSolve with StepMonitor

I want to step-monitor at each time step of a spatio-temporal NDSolve (using the finite element method) the maximum bending of the function sampled over the curent mesh. For this I first need access ...
0
votes
1answer
29 views

Changing the integration equation in NDSolve upon an event

I'm trying to implement the solution to the following ODE dx/dt = -x for x < 0 dx/dt = x for x > 0 Using NDSolve and ...
0
votes
1answer
49 views

NDSolveValue gives an error that a list of equations is expected

I have this system of PDE that I want to solve. I reduced my original system of PDEs to the system below to capture the error (the actual code is after the image at the buttom): Function ...
0
votes
1answer
37 views

Changing variables to obtain derivatives of new variables [duplicate]

Let's say that I have some symbolic expression of a function $x(t)$, and would like to obtain its derivative $x'(t)$. However, I also have the following two identities, $\xi = \omega t$, and $\eta = ...
0
votes
1answer
52 views

How to specify boundary condition in a system of PDE?

I have this system of PDE below. But upon running the code I get an error: R = 3.95; gamma1 = 0.2667; gamma2 = 0.35; This is the system of equations, initial ...
3
votes
2answers
76 views

Making NDSolve choosing by itself a spatial meshing leading to correct integrated results

In a previous post, I was asking how to force a fine spatial meshing in NDSolve using the FiniteElement method. The solution was ...
0
votes
1answer
40 views

DSolve Difficulty to Make it work [closed]

I have the following equation: $$\frac { 1 } { 2 } m \dot { x } ^ { 2 } + \frac { 1 } { 2 } k x ^ { 2 } = \frac { 1 } { 2 } k g _ { 0 } ^ { 2 }$$ with initial conditions: $x = 0$ and $d x / d t = ...
4
votes
3answers
76 views

Forcing at least $n$ spatial steps in solving a 1D spatio-temporal PDE problem with NDSolve

I want to solve the telegraph equation with a spatial discretization forced at 200 points. I tried: ...
10
votes
4answers
319 views

Poisson equation with pure Neumann boundary conditions

Dear Mathematica users, I would like to numerically solve a, as the title says, Poisson equation with pure Neumann boundary conditions $-\nabla^2(\psi)=f$ $\nabla(\psi)\cdot \text{n}=g$ Is it ...
2
votes
1answer
104 views

Numerically solving the Laplace equation in a 2d cylinder

Consider the following Laplace equation and boundary condition $$\begin{equation}\begin{cases} \Delta \theta(r,\phi)=0 \\ \int d \vec{\ell}\cdot\nabla \theta(r,\phi)=2\pi \end{cases} \end{equation}$$...
0
votes
0answers
57 views

Plotting the parameters of Mathieu equation for stability region

I am trying to plot stability regions of Mathieu equation with a and q parameters, I plot this and now i want that i fix the value of x between -5 and 5, and corresponding to each value of x,I get ...
0
votes
1answer
60 views

I can't solve system of differential equations with Dsolve

Here is the code and the system, and it is supposedly analytically solvable. $$\frac{dx(t)}{dt} = i(\frac{3w}{2}x + ke^{2iwt}y)$$ $$\frac{dy(t)}{dt} = i(kxe^{-2iwt} +\frac{3w}{2}y)$$ and my code ...
0
votes
1answer
53 views

Can anybody explain the meaning of the DSolve's result?

The DSolve in the following code gives a solution to a nonlinear PDE, which is like a certain implicit solution according to the documentation (see the second ...
4
votes
1answer
247 views

Why is DSolve different when the equation is built programmatically?

Here is a simple differential equation. mwe=y[x]/.First@DSolve [{y'[x]==x-2*x*y[x],y[0]==0},y[x],x] I get the answer $\frac{1}{2}-\frac{e^{-x^2}}{2}$ If I build ...
20
votes
3answers
720 views

What is the definition of Curl in Mathematica?

I have a usual mathematical background in vector and tensor calculus. I was trying to use the differential operators of Mathematica, namely Grad, ...
0
votes
0answers
46 views

Solving system of differential equations in loop with recursive variable

I've been posting various questions about similar pieces of code all year, so if this looks familiar you may have seen another one of my posts, but this is a unique issue that has not been asked yet, ...
1
vote
0answers
52 views

Plot ContourPlot2D of PDE that depend of time over a set of image slices

A few days ago i made a publication asking about of projecing ContourPlot3D onto 2D slices (Project ContourPlot3D onto 2D slices. It is possible?), but i think i did not explain myself very well. I'm ...
3
votes
2answers
69 views

Dealing with stiffness in solving Mukhanov-Sasaki equation

The code that I wrote is rather long, but I have included the whole code. ...
1
vote
1answer
57 views

System differential equations

I have the following code for solving differential equations: ...
0
votes
1answer
56 views

Plotting the solution of differential equations [closed]

I want to plot solution of differential equations. I can get real values out of my function, and get no errors from the Plot, but also no curve shows up. Assume ...
0
votes
1answer
57 views

Solving differential equation step by step

Is it possible to see the details of DSolve? I mean that instead of getting the answer I would like to see the step-by-step solution, which result in correct answer.
0
votes
2answers
87 views

3D Phase Portrait of a System of differential equations

Here I have a system as follows: $$\frac{dx}{dt}=a(by-x); \frac{dy}{dt}=rx-xz; \frac{dz}{dt}=(xy)^n-bz$$ Here $x, y$ and $z$ are positive real variables. All the parameters $a, r$ and $b$ are all ...
2
votes
2answers
85 views

How to evaluate the “Domain” of a Parametric Function?

In a simple example I try to calculate the time the solution x[t] passes a second time x[t]==1. ...
0
votes
1answer
57 views

Plot Derivative of ODE system

I want to Plot Derivatives of ODE system. ...
1
vote
1answer
105 views

How can I get NDSolve to use a disk file for working storage?

I'm trying to solve 16 time-dependent coupled differential equations using NDSolve and it is taking too much RAM, as a result, the code is not giving results. To ...
8
votes
2answers
205 views

Finding the point closest to a parameteric curve produced by a numerical method

Question How can I find the closest point to a parametric curve produced by a numerical method. General Context I have a parametric curve (which I will call $g$) produced from a averaging many ...
5
votes
2answers
110 views

How to preserve normalization in NDSolve?

I have a probability density function: $P_{init}(x)=\exp(-(x-x0)^2)/\sqrt{\pi}$. I am trying to use it as the initial condition for the following partial differential equation: ...
7
votes
1answer
128 views

Absorbing Boundary Condition for Complex/Coupled PDE

Context: This question is relevant to the physical problem of an excited leaky cavity. The boundary condition on the inside of the cavity is Dirichlet. The other end of the cavity is partially blocked ...
0
votes
1answer
70 views

NDSolve for coupled differential equations with large coefficient

I have three coupled differential equations to solve. Those equations are ...
1
vote
0answers
23 views

Numerical continuation methods for bypassing a singularity when integrating an ODE

Here is the ODE I want to numerically integrate, odey=-l (1 + l) R[y] + (k - y) (-2 Derivative[1][R][y] + (k - y) (R^\[Prime]\[Prime])[y]) If we rearrange it in ...
2
votes
1answer
70 views

Trying to to solve the ‘dog chasing rabbit’ problem with DSolve

When I type the following into Mathematica, it just returns it back to me unchanged: ...
3
votes
2answers
151 views

How can I use the Newton-Raphson Method to solve nonlinear Differential Equations in Mathematica?

Suppose we want to solve y'+y^2=1,y(0)=0,0⩽x⩽1 by using the Newton-Raphson method which usually used to solve the nonlinear algebraic equation by: xn=xn−1− f(xn−1)/ f′(xn−1); How can we do it for ...
3
votes
2answers
68 views

Trying to plot the norm of the solutions to NDsolve

I have been tried to do two things with the solutions from NDSolveValue plot the norm of the solutions of a differential equation system versus time. plot one component of the solutions of a ...
1
vote
2answers
52 views

Using DSolve to solve fourth order ODE

I am solving the following equation using Dsolve command in Mathematica: DSolve[a1*y''[x] + y''''[x] == 0, y[x], x] The general solution of these equations are ...