# Questions tagged [differential-equations]

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

4,447 questions
Filter by
Sorted by
Tagged with
40 views

### Non-linear ODE from closed-loop system and Response (Part II)

I again need help with the Mathematica. We have the following affine system. I need to get expressions describing the changes of $x_{1} \left( t \right)$ or $x_{2} \left( t \right)$. The only thing ...
39 views

### How to create a correct density plot from “NDSolve” solution?

I would like to create the projection of a solution in plane from the differential equation set solution. However, the way I did it is not as I would like it, it does not have a smoothness. Here's ...
97 views

### Numerical resolution of non-linear coupled ODEs

I have problem with my code in Mathematica. I have introduced the set of coupled non-linear ODES. This is the resolution part: ...
84 views

In a simple example I try to solve the heat equation using NDSolve and Method->"FiniteElement". I know that NDSolve gives ...
28 views

### Solving differential equations and plotting the function against a parameter

I wrote the following code using the function NDSolveValue ...
48 views

### How to solve this ODE by DSolve or NDSolve?

I try to solve this second order ODE to get k: $\frac { \partial }{\partial z} ~ \frac{ \partial } {\partial \bar{z}}~ k[z, \bar{z}] = 5$ Where z is complex coordinates, so to take the ...
46 views

I frequently use Streamplot and NDSolve for representing vector fields and their trajectories. But for the first time these tools present different dynamics. How can I fix it? I am putting here the ...
48 views

### Second order differential equation not getting solved using DSolve

I am trying to solve this second order differential equation $-\frac{k T}{q n(x)} \frac{d^2n(x)}{dx^2} + \frac{k T}{q (n(x))^2} (\frac{d n(x)}{dx})^2 = \frac{q}{\epsilon} (N_D(x) - n(x))$. So I want ...
26 views

### Solving numerically a dissipative non-linear system of coupled ODEs [duplicate]

My problem is to integrate a set of couple non-linear and first order ODEs. They are Eqs. (45) -- (50) in the paper https://arxiv.org/pdf/1901.03380.pdf. This is the set of differential equations I ...
34 views

I have this system of equations: $- \ddot{z} + \frac{1}{g} \frac{\partial g}{\partial z} \dot{z}^2 + \frac{1}{g} \frac{\partial g}{\partial z^*} \dot{z} \dot{z}^*$ =0 , $- \ddot{z}^*+ \frac{1}{g^*} ... 2answers 54 views ### Checking NDEigensystem Results I'm looking to verify the output of a call to NDEigensystem. I'm doing this by plotting the operator acting on the Interpolating Function outputs versus the ... 2answers 4k views ### ndsz : step size is effectively zero; singularity or stiff system suspected This is the first time I ask a question. I have seen many solutions to this error and tried but they are not working. Here is the code. ... 1answer 448 views ### Meniscus outside of a cylinder - axisymmetric Young-Laplace equation in semi-infinite domain How to solve the axisymmetric Young-Laplace equation $$\frac{z'(r)}{r \sqrt{z'(r)^2+1}}+\frac{z''(r)}{\left(z'(r)^2+1\right)^{3/2}}=z(r)$$ with b.c.s $$z'(1)=-2$$$$z'(\infty)=0$$ where$z=Z/l_c$... 0answers 31 views ### Time optimization of motion using mathematica Let us say I have a double pendulum, with the torque equations and the initial and final poisition of the end point of the pendulum. I have constraints on the maximum and minimum values of torques. I ... 3answers 74 views ### The solution of only one equation being recorded, when all solutions should be recorded [duplicate] I have the following code ... 0answers 44 views ### Using FullSimplify to simply expressions involving differential operators I am trying to simplify some long formulas involving differential operators in$n$variables. For example, I want to simplify $$\left(\frac{\partial}{\partial x}-\frac{\partial}{\partial y}\right) \... 1answer 55 views ### Differential equation is not working I am trying to solve Differential equation, but its not working. Even, if I am using rhs=1, still it does not work. Any idea will help me a lot ... 1answer 72 views ### Nonatomic expression expected at position 1 in First[None] This is a follow-up question to an earlier question:Solving a system of PDEs on a piecewise polynomial domain. I tried to solve the system of equations from one of my previous post with the different ... 1answer 181 views ### Mathematica code for bifurcation diagram in 3D Good day. I need help with the code in mathematica to plot the bifurcation diagram (e vs z*) or (e vs x*), for the system ... 1answer 50 views ### Hybrid ODE simulation with very small parameters I am trying to solve a Hybrid dynamical system using NDSolve and WhenEvent. I am able to simulate when the parameters are close ... 0answers 37 views ### How to solve a system of five second order differential equations with boundary conditions? I want to solve system of five differential equations of second order with their respective boundary conditions. So, I create a function that depends on their solutions. Such as ... 1answer 47 views ### NDSolve Maxsteps Reached Error I'm trying to solve a system of Equations. The code is commented below, I am mainly conserved with the last few lines, specifically the NDSolve line. No matter what I do to the Maxsteps option, the ... 0answers 49 views ### Recommended model for hysteresis I have a fabric-based strain sensor and would like to find out what other recommended models can be used in the hysteresis modelling. I have tried using the cubic function for loading and unloading ... 3answers 191 views ### Include boundary conditions in wave equation solver I'm solving a wave equation using mathematica. I already included the initial displacement and velocity. However, I don't seem to be able to include boundary conditions u(-\pi,t)=u(\pi,t)=0. ... 1answer 56 views ### Mathematica crashes with non-integer exponents using NDSolve I want to solve a system of coupled PDEs. It works fine if I set i=0. (i is in the exponent of the PDEs) or i=1. in the code. However, if I set, e.g., i=0.1 NDSolve crashes after a few seconds.... 2answers 57 views ### Solving two parametric ODEs and then plotting a curve derived from the solutions with respect to the parameter I have the following code ... 0answers 50 views ### Solving ODEs in several variables for a single function? Consider differential equations such as ... 1answer 104 views ### Stabilized Inverted Pendulum Blog Post Broken in 12.0? One of the old Wolfram blog posts that I use frequently is this demonstration of the LQR gains computation. https://blog.wolfram.com/2011/01/19/stabilized-inverted-pendulum/ I've been able to trust ... 0answers 230 views ### Solving Maxwell's Equations in Mathematica For the sake of demonstration (for my students) and practice, I wanted to numerically calculate the electric and magnetic field (3D) for a sphere of uniform density moving slightly to the right and ... 1answer 82 views ### How to solve set of linear differential equation in Mathematica? I have a set of linear differential equations and are written in this format [X']=[Y]-[R] where [P][Y]=[Q] My actual P matrix size is of 20x20 and Q is of 20x1 and Y is of 20x1. I have written this ... 1answer 49 views ### How do I formulate a Dirichlet boundary condition for which the boundary depends on the other variable? I am trying to solve the Poisson equation on a cylindrical grid.$$ \frac{1}{r^2} \frac{\partial}{\partial r} r^2 \frac{\partial f(r, \theta)}{\partial r} = n(r, \theta)$$Analytically, there is ... 1answer 53 views ### Asymptotic solution of a second-order ODE containing InverseFunction Essentially, I have a second-order differential equation given by ode below. In order to solve it, I need to obtain an asymptotic solution where$g(x)$must vanish at infinity which will be used after ... 2answers 99 views ### Trouble second-order ordinary differential equations with integral terms I am a beginner of mma. During the learning of differential equations, I encountered a very difficult problem, a second-order system of ordinary differential equations with integral terms. This ... 1answer 235 views ### Neumann boundary condition is not satisfied I want to solve the diffusion equation on a disk centered at (0,0) with a radius of 1. I also want the flux at a radius of 0.8 to be zero. I have this initial condition at time zero: ... 1answer 377 views ### Can NDSolve address spherical gravitational collapse? As far as I know spherical gravitational collapse -of central importance to theoretical physics- is thought to be out of the scope of Wolfram Mathematica. However there are cases, as in this article,... 1answer 71 views ### Coupling DirichletCondition of one dependent variable to the value of the second Maybe due to my limited experience with PDEs solving I could not find the answer to the following issue. Let's say we have a simple advection along a line: ... 2answers 39 views ### Solving a simple differential equation and trying to plot the trace of the solutions I am trying to run a simple code on Mathematica. However, it is not running for some reason. What mistake am I making? ... 1answer 115 views ### Is it possible to fit such a large range plot in mathematica? I am trying to solve the coupled differential equation numerically with Mathematica. But the range of values are large so mathematica cannot give correct plot. Here is the code: ... 2answers 150 views ### How to use NDSolve with limited RAM? How can I use NDSolve when running out of RAM? The code I am implementing: ... 0answers 43 views ### Slope Fields in Mathematica and Sketching Appropriate Solution Curves How would I plot the differential equation dv/dt = 32-1.6v, where v(0)=0 I also need to solve for the limiting velocity. I am having a hard time figuring out how to find the limiting velocity. I ... 1answer 103 views ### Shooting Method for Numerical Solution I am trying to solve the following nonlinear differential equation using the shooting method. The equation is a boundary value problem with boundary condition x[0]=Pi and x[Infinity]=0. In order to ... 3answers 447 views ### Compare FEM mesh with the mesh created within Mathematica This is a follow-up question to an earlier question: Make uniform mesh with quad elements Question: How to solve system of equations with NDsolve on the mesh created in Ansys in order to compare it ... 1answer 74 views ### Simplifying$\left(f\left(x\right)\frac{\partial}{\partial x}\right)^nf\left(x\right)\$ into a summation

In case you're wondering how to get differentials to act like operators in Mathematica, I stumbled across a package Carl Woll made to solve this issue in this question. There's a a more recent version ...
45 views

### Using MinValue with NDSolve

A simplified example looks like this. The basic idea is to maximize fHelper by adjusting \[Alpha] for each ...
67 views

### Unable to use ElementMarker in DirichletCondition with structured quad mesh

I would like to use ElementMarker in a DirichletCondition on a structured quad mesh, but I am receiving the error: ...
804 views

### Simulating a partial differential equation - reaction-diffusion systems and Turing patterns

I want simulate a reaction-diffusion system described by a PDE called the FitzHugh–Nagumo equation. The system that has been proposed by Alan Turing as a model of animal coat pattern formation and is ...
62 views

### Mathematica 12: avoid crashing when using NDSolve on a large domain

I have a set of coupled PDEs, that I'd like to solve numerically using Mathematica (11.3 or 12.0). The problem is, that I need to solve in on a large domain to make sure that there are no boundary ...
46 views

### ReplaceAll error on trying to extract solutions the results of DSolve

I'm trying to solve symbolically a system of differential equations (simplified example): ...