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
0
votes
0answers
34 views

Plotting NDSolve function in complex coordinates

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^*} ...
0
votes
2answers
98 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: ...
1
vote
1answer
117 views

Help speeding up solution of system of differential equations using Laplace transform

I'm trying to speed up this code that seems to take forever to evaluate. I'm solving a system of 9 coupled differential equations using a Laplace transform (a version of this code that works perfectly ...
1
vote
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 ...
3
votes
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 ...
0
votes
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 ...
0
votes
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) \...
1
vote
3answers
74 views
0
votes
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 ...
1
vote
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 ...
2
votes
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 ...
0
votes
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 ...
5
votes
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 ...
6
votes
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$. ...
2
votes
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....
0
votes
2answers
57 views
0
votes
0answers
50 views

Solving ODEs in several variables for a single function?

Consider differential equations such as ...
10
votes
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 ...
6
votes
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 ...
0
votes
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 ...
0
votes
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? ...
3
votes
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: ...
0
votes
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 ...
2
votes
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 ...
0
votes
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 ...
0
votes
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: ...
0
votes
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 ...
0
votes
1answer
73 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 ...
6
votes
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 ...
1
vote
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 ...
2
votes
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: ...
0
votes
2answers
45 views

Using MinValue with NDSolve

A simplified example looks like this. The basic idea is to maximize fHelper by adjusting \[Alpha] for each ...
2
votes
1answer
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 ...
1
vote
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 ...
3
votes
0answers
53 views

Help implementing Magnus Expansion

The Magnus expansion is a tool to approximate solutions to first-order linear differential equations (the Wikipedia page is quite instructive and concise) - it's particularly useful because all orders ...
1
vote
1answer
70 views

Numerical solution to Differential equation

I want to get the differential solution numerically. I used wolfram alpha. here is the link. I tried this code on the Mathematica file. ...
5
votes
1answer
94 views

Why DSolve gives different answer depending on order of variables: $u(x,t)$ vs. $u(t,x)$?

Using V12 on windows 10. I would think it should not matter if one uses $u(x,t)$ or $u(t,x)$ in the specification of the PDE, as long as everything else is consistent (keeping the initial condition ...
5
votes
1answer
75 views

How Does StreamPlot Handle Singularity or Indeterminates?

I will like to know how StreamPlot finds its way around singular/indeterminate values. Actually, I was thinking of using ...
0
votes
0answers
59 views

Implicit function definition and variable change

in my code I solve a non-linear system of ODE to obtain the positive functions RadEnDens and PhiEnDens, everything as a function ...
6
votes
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,...
5
votes
3answers
224 views

Problems with solving PDEs

I am using NDSolve to solve the two equations: ...
0
votes
1answer
71 views

DSolve returns unevaluated(I need a closed or numerical solution for this system and plot solution)

I am trying to find a solution to this system of differential equations but the program gives the same output without any messages. I would like help. Please find the Mathematica code posted here. a ...
0
votes
0answers
61 views

Next maximum plot with results from NDSolve

I want to produce a Next-maximum-plot, i.e., I want to plot all local maxima $m_{i+1}$ against the local maximum $m_i$ in order to check for chaotic behavior. In particular, I have the following code:...
2
votes
0answers
94 views

Why doesn't NDEigenSystem give smooth eigenfunctions? [closed]

I'm looking for smooth solutions of the 1D Helmholtz equation $\left[\frac{d^{2}}{dx^{2}}+k_{0}^{2}\epsilon(x)\right]\phi=0$ with homogeneous Dirichlet boundary conditions, where the permittivity $\...
3
votes
1answer
63 views

Unexpected error when implementing FEM in MoL SpatialDiscretization

I cannot figure out why the following piece of code ...
4
votes
2answers
80 views

MoL: How to enforce Chebyshev–Gauss–Lobatto points in SpatialDiscretization?

In Mathematica documentation one is prompted to use a grid with points at the zeros of the Chebyshev polynomials so that Runge's phenomena arising from ...
2
votes
1answer
60 views
0
votes
0answers
28 views

Manipulating a One-Dimensional Plot of ParametricNDSolveValue

I am trying to use manipulate with a plot of a numerical solution to a system of two coupled differential equation solved using ParametricNDSolveValue. I have ...
1
vote
1answer
62 views

Why does domain size change results of NDSolve? / How to overcome this?

this is a follow-up on a previous question which was answered, but it turned out that I was running in circles... I have the following code: ...
0
votes
1answer
57 views

How to solve for a Diff Eq? [closed]

Solve the differential equation y'(x) + x * y(x) = 0, where y(0) = 3. Show your solution is correct; that is, plug it back into the original DE and show it works.