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
1answer
51 views

plot multiple curves : solution obtained from NDSolve

I want to plot the solution obtained from NDSolve as a multicurve plot like shown in the following sample image (image ref). Here, x1, x2 , x3, x4 .. are the solution computed at ...
1
vote
0answers
44 views

Simulated Cartpole Example in Mathematica

I am interested in modifying the code underlying the reinforcement learning example SimulatedCartpole in Mathematica 12. This example is still listed as Experimental. The help function indicates that ...
-1
votes
0answers
86 views

Please I need help, how can I solve this heat impulsive system?

Please I need your help!! I'm a beginner with the Mathematica program, I need to code the following system: $$ \left\{\begin{array}{ll} \partial_{t} \psi(x,t)-\Delta \psi(x,t)=0, & (x,t)\...
0
votes
0answers
34 views

plot the solution obtained from NDSolve

I would like to plot the solution obtained from solving a PDE using NDSolve at the x-coordinates specified in includePoints = {{10}, {20}, {30}, {40}, {50}}; as a ...
0
votes
0answers
20 views

Solving a matrix differential equation by using a function that takes a matrix as its argument

I have a function 'g' of the form g[y_]:=A.y.B, where y is a 2-by-2 matrix whose elements are in turn functions of time 't'. I am trying to solve an equation that consists of a differential equation ...
0
votes
0answers
46 views

Error while using NDSolve

I'm trying to solve a PDE using NDSolve. cfun = NDSolveValue[pde, c, {t, 0, tEnd}, DirichletCondition[c[t, x] == 5, x == 0], {x} \[Element] mesh]; I get the ...
3
votes
1answer
81 views

'gradient' function in MMA

How to calculate Numerical gradient of 2D arrays using the "gradient function" ("Matlab-like")? "[___] = gradient(F,hx,hy,...,hN) specifies N spacing parameters for the ...
0
votes
1answer
44 views

How can I adjust the size of this parametric plot output? [closed]

I have a problem with the dimensions of the output of a ParametricPlot. What I'm trying to do is solve a differential equation using ...
1
vote
2answers
107 views

Fokker Planck Equation in Mathematica giving weird solution

I have the following equation $$\frac{\partial\,P(\theta,t)}{\partial t} = \alpha\cos\theta\,P(\theta,t) + \beta \frac{\partial^2\,P(\theta,t)}{\partial \theta^2} $$ subject to following conditions$$P(...
0
votes
0answers
28 views

List not same shape when using NDSolveValue [closed]

I'm trying to define a function from NDSolveValue, but it is returning the following error (imagem below). Here is the code: ...
5
votes
1answer
86 views

DChange fails to change variables for 1D Schrödinger equation

I have a PDE (1D Schrödinger equation) as follows: Applying the following transformations to the PDE, we get the following ODE: I am trying to use @Kuba 's ...
-4
votes
0answers
22 views

Energy eigenvalues by solving Schrödinger equation for hydrogen atom using Coulomb potential [duplicate]

I have asked the question before but did not get the necessary answer and please dont provide links, give answers if you know
1
vote
1answer
63 views

NDSolve::ndsz: step size is effectively zero; singularity or stiff system suspected + other warnings for system of differential equations

I'm trying to solve a set of differential equations numerically to get a 3D plot, but I am getting multiple different warnings and errors. First of all, here is the code: ...
0
votes
0answers
44 views

Why the stop Integration can not be triggered?

I use mma to solve this differential equation, But I find that the stop condition in WhenEvent cannot be triggered, I want to know why. Thanks a lot. ...
-1
votes
0answers
46 views

How to find energy eigenvalues of Schrödinger equation for hydrogen atom? [duplicate]

I am trying to find energy eigenvalues by solving the Schrödinger equation for hydrogen tom using potential V=-e^2/r and plot the corresponding wavefunction,can soneone give the code?,i have been ...
2
votes
1answer
67 views

how to solve matrix differential equation using Mathematica

I have to solve $[m]x''+[c]x'+[k]x=[p]$ where x is function of $t$ after defining $[m],[c],[k]$ and $[p]$ in mathematica and x[t_]={x1[t],x2[t],x3[t]} I am using ...
2
votes
1answer
102 views

Checking a solution of PDE

I'm having trouble verifying solutions for complex PDEs including conjugate and absolute value. For Example: I have a complex PDE: where superscript * denotes conjugate of the unknown function ...
-1
votes
0answers
44 views

How to solve the nonlinear Schrödinger equation using 4-order Runge Kutta method? [closed]

I want to solve numerically the nonlinear Schrödinger equation (in Matlab) $$ \frac{\partial\psi}{\partial t}=-\Delta\psi - |\psi|^2\psi $$ using RK4 but i don't know how to do this.
1
vote
1answer
50 views

set of ODEs with Integrate inside NDsolve?

I have set of ODEs with integration and to be solved with NDsolve. But because of existance of Exp[-2 qr[z] r^2], I can not find the solution. By the way, if ...
1
vote
1answer
109 views

Incorrect result of DSolve

Let us dsolve that Cauchy problem with 12.3 on Windows 10 Pro: ClearAll[w, z]; sol = DSolve[{w'[z] == -1/2 - Sqrt[1/4 - 3*w[z]], w[1] == -1}, w[z], z] ...
0
votes
0answers
47 views

Solve Partial Differential Equation with Neumann Boundary Condition [closed]

I am trying to solve the heat equation with certain boundary conditions (one-dimensional in space). I tried it this way: ...
0
votes
1answer
57 views

How to ParametricPlot an InterpolatingFunction

Hi I can Plot the result of an NDSolve (toy example), but I cannot ParametricPlot it. ...
0
votes
0answers
50 views

Output is derivative of state variable

Given simple system of ODE. \begin{cases} \dot{x_1}=-x_1+u \\ \dot{x_2}=-x_2-x_1 \end{cases} As an output, I want to use $y=\dot{x_1}$. But when I use the ...
0
votes
0answers
32 views

Unable to find the plots of NDSolve [closed]

My code is given below ...
0
votes
1answer
79 views

Get the trajectory of an object in a gravitational field

Given the initial position and velocity, I want get the trajectory of an object in a gravitational field. Instead of using Kepler's Laws, I want to solve the following differential equations: ...
0
votes
0answers
57 views

FindRoot::dfmin: The minimal damping factor of 1/10000 has been reached

I have to solve a highly nonlinear parametric system of three PDEs. I don't know to which extent the results are trustable. Indeed, the graph shown by ParametricNDSolve also presents the error message ...
4
votes
1answer
89 views

Export solutions of partial differential equation in mathematica

I have a system of coupled first order partial differential equations. Minimal code is shown below: ...
0
votes
2answers
146 views

How would you set up the folllowing differential equation in Mathematica?

I have 20 coupled differential equations and would like to solve them numerically in Mathematica. How would I set this up in some vectorised way?
4
votes
2answers
665 views

Where I am wrong?

I have an ODE: ( I want to write a code for Manuel solution algorithm) ...(Eq.4) STEP 1: Assume that the solution of ODE can be expressed by ...
5
votes
2answers
111 views

Unable to solve nonlinear PDE with NDSolve

Lately, I've been trying to solve the following PDE: \begin{equation} -v_0 |\nabla F| + {\bf f}\cdot \nabla F +D\nabla^2F = -1 \end{equation} inside a 2D region between two disks both centered in the ...
3
votes
0answers
70 views

How to correctly DSolve it?

Solving a PDE with Mathematica, I obtain sol = DSolve[Sqrt[D[u[x, y], x]] + Sqrt[D[u[x, y], y]] == x, u, {x, y}] ...
0
votes
1answer
41 views

Particle moving in a 2D box [closed]

does anyone know, how classical mechanics (likes forces, velocities or boundary conditions) could be integrated in a code? do you maybe have some ideas how i can write a code for my particle in a 2D ...
0
votes
0answers
55 views

Overflow in NDSolve

The code is like this ...
1
vote
0answers
43 views

Plot a sample trajectory in StreamPlot [closed]

I am stuck in what it should be a very simple task, and I wonder if you could give me some light on this: I have the following two differential equations: ...
1
vote
1answer
86 views

Asymptotic Output Tracking: Compensator properties

Asymptotic Output Tracking: Code Issues The question is, rather, of a theoretical nature (practical applications can be viewed in the topic at the link). Asymptotic Output Tracking is said to be based ...
2
votes
1answer
102 views

Creating random differential equations

I'm working on an educational project and new to Mathematica Language. Can I create,like multivariance equations with different f[x] in y'[x]=f[x] by using one function? The output should be like this:...
5
votes
0answers
104 views

AceFEM: Divergence in iterative procedure (Newton-Raphson) for fine meshes

I am trying to model a problem of a nearly incompressible $10~\rm{m} \times 2~\rm{m}$ beam with a uniformly distributed end load. The beam has a Young's modulus of $200~\rm{Pa}$ and a Poisson's ratio ...
4
votes
3answers
229 views

“Spaghetti”-solutions for ODE nonautonomous system and reduced vector field

Projections of the 3-dimensional phase-space of a non-autonomous ODE system Multidimensional obstacle avoidance in ODE (Visualization) Given simple system of ODE: $\begin{cases} \dot{x}=g \\ \dot{o}=2 ...
0
votes
0answers
51 views

Projections of the 3-dimensional phase-space of a non-autonomous ODE system

Given classical system of ODE: $\begin{cases} \dot{x}=g \\ \dot{g}=t \cdot (-g+\frac{df}{dx}) \\ \dot{h}=-h+\frac{d^2f}{d^2x} \end{cases}$ where $f = e^{-x^2}$ I am constructing a three-dimensional ...
6
votes
2answers
266 views

How to write that Lyapunov function?

For didactic purpose I investigate the stability of the ODEs system {x'[t] == x[t] + y[t], y'[t] == -5 x[t] - 2 y[t]}. Its stream plot ...
0
votes
0answers
57 views

NDSolve not recognizing symbolic derivative as a function

I'm trying to solve a nonlinear first order initial value problem $\{x'[t]= f[x,t],\ x[t_0]=x_0 \}$ using NDSolve. The function $f[x,t]$ is complicated, as is the computation of the initial x-value. ...
6
votes
3answers
421 views
1
vote
0answers
45 views

Question on AsymptoticDSolveValue

I would like to use AsymptoticDSolveValue to solve following type of equations at infinity y''[x] + (1 - 1/x^s) y[x] == 0 where ...
2
votes
1answer
85 views

Getting plots form differential equation with two discrete parameters

I am solving the following differential equation for different values of a and n: $\qquad y'=- \lambda (y^2-Y_{eq}^2)$ where $\qquad Y_{eq}(x)=1/\pi^2 \int_0^\infty y^2/[\exp(\sqrt{x^2+y^2})+1]dy$ ...
0
votes
0answers
52 views

Construction of Navigation Function: Error

https://en.wikipedia.org/wiki/Navigation_function https://www.sciencedirect.com/science/article/abs/pii/S0921889015302451 https://arxiv.org/pdf/1605.00638.pdf - Paragraph III I am trying to create a ...
1
vote
1answer
73 views

ParametricRegion

I need to solve a PDE inside a region confined between two waves (as in the figure below). The waves amplitude and period do not matter at the present point (they can be arbitrary) I just need an ...
5
votes
3answers
320 views

How do you find information regarding the derivative?

I have been struggling with an issue that I believe has a simple way to solve. Given that I have extracted a term of a partial differential equation: f(1,2,0) [x,y,z]. In this case, it is similar to ...
1
vote
0answers
65 views

Multidimensional obstacle avoidance in ODE. Part II

Multidimensional obstacle avoidance in ODE (Visualization) https://math.stackexchange.com/questions/4146255/multidimensional-obstacle-avoidance-in-ode For some time, I studied this question more ...
1
vote
0answers
51 views

Non linear PDE solution

Could someone advise if it is possible to solve the following PDE with Mathematica? I am quite a beginner in Mathematica so any input would be highly appreciated. $\displaystyle\frac{1}{2} \sigma^2\...
12
votes
2answers
294 views

Total flux of the gradient of the numerical solution of a PDE through a surface

Trying to solve the following PDE with BC T==1 on a spherical cap of a unit sphere and T==0 at infinity (approximated as ...

1
2 3 4 5
118