Stack Exchange Network

Stack Exchange network consists of 174 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.

3
votes
0answers
45 views

Plotting gradient and newton directions for parametric system of nonlinear ODEs

I have a bucket (system) of chemical kinetics models, a nonlinear dynamical system given by: where kf >= 0 and kr >= 0 are the parameters. The initial conditions are A(0) = B(0) = 1 and C(0) = 0. I'...
4
votes
0answers
34 views

DSolveValue gives a confusing result for a simple vector-valued equation

If we use DSolveValue on just about the simplest vector ODE I can think of, it gives the following result. ...
1
vote
1answer
48 views

Real General solution of differential

For next Riccati d.e $ y' = (y^2) - 2 x^2 y + (x^4) + 2 x + 4 $ with DSolve i get Complex general solution Opres = DSolve[y'[x] == y[x]^2-2x^2*y[x]+x^4+2x+4, y[x], x] $\left\{\left\{y(x)\to \frac{...
1
vote
1answer
58 views

Non Trivial Conserved Quantity Fails To Be Conserved After Solving System of ODE's Via NDSolve

I'm trying to solve the following Darboux system of equations numerically. As a result I have the following implementation of NDSolve ...
2
votes
2answers
187 views

Help for Solving Two Equations For Two Unknows (from a Paper)

I am trying to reproduce numerically the results found in this paper: https://ieeexplore.ieee.org/document/1707778 You don't necessarily need to read it. Basically I boils down to solving a two ...
1
vote
1answer
70 views

Is NDSolve being precise here? Light deflection angle

I am currently trying to calculate deflection angles for the path of photons near Schwarzschild black holes, using the formula $$\Delta\phi=2\int_{r_0}^\infty \frac{dr}{r^2\sqrt{1/b^2-1/r^2(1-1/r)}}$...
0
votes
1answer
41 views

Why does trying to plot the solution to this system of ODEs this way lead to errors?

I would like to plot the curve $\alpha(s) = (l(s), h(s))$, where $l$ and $h$ are the solutions to the system $l'^2 + h'^2 = 1$ and $l'h''-l''h'=h'\tan(l)$. Here's what I tried: ...
2
votes
2answers
68 views

Plotting solution to Differential Equation with separable variables [closed]

Got this differential equation $$y'=\frac{-x^2(y+1)}{y^2(x-1)}$$ If I try directly to DSolve it ...
5
votes
2answers
112 views

Symbolic solution for the energy of potential flow

I have a question to a physical task in Mathematica. We have this equation of motion: $$m\cdot\ddot{x} = -m(\omega_0^2\cdot x+(\epsilon x^3))=-\frac{d}{dx}V(x)$$ For energy of masspoint there is ...
1
vote
1answer
61 views

The best way to plot General solution of differential equation in shape of Inverse Function

Differential equation which solve by separation of variables. $$ y'=\frac{x^3e^{3y}}{e^{2x}(4-y)^3} $$ ...
3
votes
1answer
141 views

Eigenvalues of a non-Hermitian complex periodic potential

I have an eigenvalue problem: $$-\frac{d^2}{dx^2} \psi(x) +V(x)\psi(x) = E \psi(x)$$ where $V(x)$ is a complex periodic potential: $$V(x) = 4[\cos^2(x) + i 0.3 \sin(2x)]$$ It has been claimed that ...
0
votes
1answer
79 views

Complex shape of general solution of differential equation [closed]

I am abit confused, in my definition for General Solution (definition which we used on Universitet) it say's for " $C \in Reals $ " and ever when i solving ordinary differential equation of first ...
1
vote
1answer
74 views

Is there any way to save time using of “Cross” or “Table”?

I need to solve a equation by NDSlove, so I write the equation first, but it takes me a lot of time. The follow is my code ...
-2
votes
3answers
83 views

Wronskian, differentials equations [closed]

How can I in Mathematica find the Wronskian for two piecewise functions $$ \begin{align} \varphi_1(x) &= \left\{ \begin{array}{cl} -x^3 & x \in [-1,0], \\ ...
2
votes
1answer
175 views

Cat catch mouse , application of differentials equations [closed]

Can anyone help me with this: We have a room 4 metres deep and 4 metres wide. In the far right corner is a mousehole. The cat starts in the bottom left corner, and the mouse starts in the top left ...
0
votes
0answers
48 views

Why does DSolve return the same DSolve expression?

I am trying to find the closed solution for the classic chemostat model with one species and one resource (Monod response) using the DSolve() function. However, after running for 10 minutes, I get ...
2
votes
1answer
71 views

EDP exotic boundaries condtions

I'm trying to numerically solve Laplacian(V(x,y)) = 0 on a cross having Dirichelet conditions on two opposite borders (e.g. V(0,x)=-10 and V(5,y)=-10) and having dV(x,y)/dx = const . dV/dy for ...
0
votes
0answers
46 views

NDSolve:Method of Lines: Spatial Discretization: bother doing it explicitly or just implement as internal routine?

My question is whether one's code must always contain the actual description of spatial discretization written explicitly or whether the Method of Lines can be called as an internal routine. If so ...
1
vote
3answers
89 views

ndsolve with multiple initial conditions

I am trying to solve a PDE using the NDsolve with initial and boundary conditions, ...
3
votes
2answers
100 views

Issues With WhenEvent in PDEs

I am trying to solve the PDE below: ...
1
vote
1answer
67 views

Solution of differential equation and then draw a graph

I have two differential equations: $da/dt = a (.3 a^{-3} + .7)^{1/2}$ and $d \tau /dt = 1/a$. The initial conditions are $t = 0$; $a = 1$ and $\tau = 0$, respectively. How can I solve the ...
0
votes
1answer
53 views

Animate a graphics with derivative function that gathered from NDSolve

I'm defined W[t] and Q[t] like below. This code is an example that shows my problem. My real code is very long and complex that i cant make change in it. I solved my differential equations but sum ...
1
vote
1answer
33 views

D.e which solving with parametrisation

I want to solve next d.e which can be solved with parametrization (that classification group). $$y'^3-4xyy'+8y'^2=0$$ ...
1
vote
1answer
85 views

ODE which can be solved without parametrisation [closed]

I want to solve the following differential equation, which can be solved without parametrisation $\qquad y^2y'^2-2xyy'=x^2-2y^2$ I need the solution for my student research project. When I try to ...
0
votes
0answers
34 views

How to solve this differential equation

I got this DSolve[k1*y''[t] == k2*y'[t] - k3*Sin[y[t]], y[t], t] But when I try to run it there is a error: "Solve::ifun: Inverse functions are being used by ...
3
votes
4answers
420 views

Can't plot DSolve's solution to Riccati differential equation

DSolve gives a strange solution for the Riccati differential equation $ y' = (y^2) - 2 x^2 y + (x^4) + 2 x + 4 $ ...
1
vote
1answer
124 views

NDSolve:PDE system, initial-boundary value problem:warning:NDSolve::mconly: For the method NDSolve`IDA, only machine real code is available

I tried to NDSolve the PDE system $$\partial_t w =x\cdot w\quad\quad\partial_z x=w$$ for $$(t,z)\in[0,1]\times[0,\pi]$$ with boundary conditions $$x(t,0)=w(t,0)=w(t,\pi)=0$$ and initial conditions $$w(...
0
votes
0answers
27 views

Domain of differential equation

I made some function for plotting Domain of differential equation , will show how it works for $y'=\frac{\sqrt{1-x^2}}{\sqrt{1-y^2}}$ ...
3
votes
2answers
150 views

NDSolve:Coupled PDE's, initial-boundary value problem: unreasonable “insufficient number of boundary conditions” error

I tried to NDSolve the PDE system: $$\partial_t y = x\partial_z w \quad\quad \partial_t w = \partial_z y \quad \quad \partial_z x=w $$ for $$(t,z)\in[0,1]\times[-1,0]$$ with initial conditions $$x(...
1
vote
1answer
63 views

Find (guess) an integral curver

I consider the following system $$ \begin{cases} x'=-x^2 + 3 x - 2 x y=:f(x,y)\\ y'=y^2 - 2 y + x y:=g(x,y) \end{cases} $$ It has a fixed point at $(1,1)$ and the linearization there has a centre,...
0
votes
0answers
23 views

NDSolve unexpectedly terms boundary conditions insufficient in initial-boundary value problem

NDSolve can easily handle the PDE system $$\partial_t y = \partial_z w \quad\quad \partial_t w = \partial_z y $$ along with initial-boundary conditions $$w(t,0)=w(t,-1)=0\quad\quad w(0,z)=-sin^2(z\pi)\...
1
vote
1answer
85 views

How to express the MeijerG as Bessel function, which leads to the general solution of the below differential equation

I wanted to find the general solution of the following ODE. The ODE is not a linear differential with constant coefficient. Its is the fourth order differential equation. I used DSolve function along ...
0
votes
1answer
77 views

How to plot phase portiere and the solutions of ODES

Dear All I know how to plot phase portrait for the system of nonlinear odes but I did not know whey the result of Show the parametric solutions with phase ...
0
votes
1answer
45 views

DSolve for system of ODE

i'm having trouble using DSolve for the following equation, which is the position equation of an object moving up a straight hill My facts are: ...
0
votes
1answer
60 views

How to solve this differential equation? [closed]

I have problem with solving this differential equation: y''[t]+y'[t]+n y[t] = 1 where n = 1,2,3,4
0
votes
0answers
29 views

How to transform term?

I need for Ploting Domain of differential equation next : $$y'=f(x,y) $$ is given differential equation . f=x/y; A=FunctionDomain[f,{x,y}] $y \neq 0 $ ...
0
votes
1answer
61 views

How to use a previous numerical solution to solve a differential equation numerically?

When I solve this differential equation with NDSolve, I get a numerical solution for H[x]: Code for the differential equation: ...
1
vote
1answer
45 views

Problem with NDSolve: the function diverges

I'm trying to numerically simulate heat flux in a 3d power cable model that i build. Essentially the equation is: I can get an analytic solution from Mathematica easily and when i plot T(x) i get no ...
3
votes
3answers
101 views

NDSolveValue: lost solutions?

Here a very easy examplary ode-problem with two solutions: ...
1
vote
0answers
47 views

NDsolve with endogenous boundary condition

I would like to solve a differential equation with a boundary that is implicitly determined by another equation (second equation in the NDsolve command below). The boundary is at s=S and determined by ...
0
votes
1answer
35 views

How to solve this differential equation? Error (NSolve :: ifun)

When I solve the differential equation I get an error: error: Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. ...
0
votes
1answer
28 views

From SSP={x->0,y->1} how to get SSP1={0,1} ? [closed]

My question is next : g = -Sqrt[1 - y^2]; h = Sqrt[1 - x^2]; Vars = {x, y}; ssp1 = Solve[{g == 0, h == 0}, Vars] I get this $\{\{x\to -1,y\to -1\},\{x\to -1,...
0
votes
0answers
46 views

DSolve inverse function

I trying to solve a differential equation DSolve[{D[r[a], a] == 3 r[a]/a (w - (g *(1 + w)*(1 + r[a]))/(1 + g*r[a])),r[1] == r0}, r, a] But the solution is a ...
0
votes
1answer
68 views

How to plot Bernouli Differential equation?

I have 2 questions. Bernoulli differential equation: $ y'(x)-y(x)=\dfrac{\mathrm e^x}{y(x)} $ When solving this step by step following this Clay Roose book [page 81, Example 3.13(M)], I get one ...
0
votes
1answer
54 views

DSolve with particular boundary conditions

I have the following equation: ...
1
vote
1answer
77 views

How to transform a FindRoot in a NDSolve?

some days ago I did a question about a problem with a findroot. The solution was to convert the FindRoot in a "fake" NDSolve. How can I do the same if the FindRoot has more equation ? I make here an ...
2
votes
1answer
59 views

Stochastic ODE Integration problems using RandomFunction

I'm attempting to add noise to a set of ODE's with two state variables. $$\frac{dx}{dt} = 10 -(x-1)\left(1+\frac{exp\left(\frac{x-1}{5y}\right)}{50y}\right)$$ $$\frac{dy}{dt} = 2(1-y) -y\cdot exp\left(...
1
vote
2answers
72 views

Current limit setup for a pulsed voltage source applied to RL in series

I have a circuit with a pulsed voltage source connected across a resistor and inductor that are in series: Potential difference of V1: The solution by LTSpice gives: Current through the inductor: ...
-1
votes
1answer
103 views

Solving ODE with RK method and plotting

I am trying to solve the following ode $i\dot{\phi_n}(t)=-\phi_{n+1}(t)-\phi_{n-1}(t)+\frac{g~ \phi_n(t)}{1+|\phi_n(t)|^2}$ with I.C. $\phi(0)=-2\cos(2.5)$ and $g=1$. However, I am unable to ...