Questions tagged [differential-equations]

Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.

6,255 questions
Filter by
Sorted by
Tagged with
836 views

Understanding PeriodicBoundaryConditions

Every thing works fine in a simple example with periodic boundary condition u[ 2,y]==u[0,y] from documentation of ...
3k views

Particles bouncing in a 3D box

I made this Manipulate code which shows a pack of particles randomly moving inside a box. It has a huge performance issue. What should be the best way in doing "...
3k views

Solving and Animating Three Body Problem

I am attempting to solve a three-body problem using the Lagrange formalism, with a 1/r potential. I started off by defining T and U (kinetic and potential energy) as follows: ...
685 views

Solution diverges in periodic PDE

Problem introduced in 11.0.1 and persisting through 11.3 Mathematica version 11 introduces PeriodicBoundaryCondition which is very useful in solving periodic PDE ...
688 views

How to guarantee that NDSolve correctly detects abrupt changes in parameters?

When using NDSolve, I often have parameters that, in most of their domain, have a constant or null variation, but that suffer from abrupt variations on a very small ...
1k views

Could Mathematica solve a differential equation asymptotically?

Is there any possibility that Mathematica could give asymptotic behavior(s) of a differential equation as it independent variable tends to a certain value? Because I didn't know how to decompose this ...
738 views

Conservation of area solving a PDE via finite difference scheme

I have two PDEs that describe the movement of fluid: $h_t + [h^3(1-h)^3((1+\varepsilon h)\sin \theta - \varepsilon h_\theta \cos \theta]_\theta$ = 0 $h_t - [h^3(1-h)^3 \varepsilon h_\theta]_\theta$ = ...
3k views

Neumann boundary conditions in NDSolve over nontrivial region

The problem I would like to solve involves diffusion in the following region ...
618 views

Plotting the eigenmodes of a cylindrical shell

There are many examples of eigenmodes computations for surfaces with Mathematica, such as: https://www.wolfram.com/mathematica/new-in-10/pdes-and-finite-elements/solve-a-wave-equation-in-2d.html, ...
910 views

Heat convection differential equations from 1952 - Mathematica "fails to converge"

I am trying to solve a fundamental problem in analytical convective heat transfer: laminar free convection flow and heat transfer from a flat plate parallel to the direction of the generating body ...
246 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 ...
453 views

Tennis Racket theorem

Torque-free Euler equations experiment seen in low gravity of Russian spacecraft is modelled here with a view to see its tumbling motion around the intermediate axis $\omega_2$ rotation. However its ...
3k views

Solve Laplace equation in Cylindrical - Polar Coordinates

Hey mathematica stackexchange!! I've got a (possibly stupid) problem. I've tried many things to no avail, and I've read every post I've found on Laplace's equation. Background: I'm trying to find the ...
784 views

FEM: Why are the numerical solutions of field equations with D and Inactive[Div] and Inactive[Grad] different?

Bug introduced in 12.1.1 or earlier - Fixed in Version: 12.2.0 Suppose you have the DE $$\frac{d}{dx} \left( c(x) \left[\frac{d}{dx}u(x)\right] \right) + n(x) = 0$$ and you want to solve for $u(x)$ ...
2k views

Finite difference method not converging to correct steady state or conserving area?

I am working with the following PDE, which is an advection-diffusion type equation. It describes the movement of a fluid-fluid interface inside an annulus of inner radius $R_1$ and outer $R_2$ under ...
4k views

How can you compute Itō Integrals with Mathematica?

How can you compute Itō Integrals with Mathematica? I tried searching through the documentations but I didn't find anything. P.S. I was not at all sure how to tag this question. I had to put in at ...
413 views

Solving the Lotka-McKendrick model with NDSolve

The Lotka-McKendrick model is a demographic model that represents the way a population changes over time due to fertility and mortality. For an age-specific population density $u(a, t)$, and a total ...
989 views

NDSolve giving a wrong solution

Consider the ODE $$\frac{y'y}{1+\frac{1}{2} \sqrt{1+ y'^2}}=-x.$$ Using NDSolve[{-x==y'[x] y[x]/(1+Sqrt[1+(y'[x])^2]/2), y ==3}, y, {x,-7,7}] and plotting leads ...
2k views

188 views

Error when using NDSolve for $\epsilon y'' - y' + y^2 = 1$

Error when using NDSolve for $\epsilon y'' - y' + y^2 = 1$ with $0<x<1$ and $y(0) = \frac{1}{3}$, $y(1)=1$ My attempt: ...
5k views

NDSolve with vectors

I'm stumped. I'm trying to write this using vectors, but the 2nd derivative isn't being expanded like I expected it to be. This is a system of equations for a projectile with quadratic drag and ...
1k views

565 views

Memory leak with NDSolve

Bug solved in 11.2 Bug introduced in 10.3 or earlier and persists through 11.0 Edit The technical team confirms the memory leak in NDSolve and has forwarded an ...
2k views

Frequency domain Maxwell equations with PML boundary conditions

I'm trying to solve a full-vectorial wave equation for an arbitrarily shaped wave guide, by using NDSolve and perfectly matched layer (PML) conditions. The PML ...