Stack Exchange Network

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

0
votes
0answers
45 views

Analytic continuation of an ODE solution with ParametricNDSolveValue

I am working on the analytic continuation of a solution of the $2\times 2$ system $$dT=TP,\quad T(1)=Id$$ where $P$ is of the form $$P=\begin{pmatrix} 0 & t^{-1}\\ \frac{t}{4}+(t-1)^2\left(\frac{r ...
2
votes
1answer
59 views

Describing solution of particular ODE with small parameter

I have differential equation (1) $x''+2\epsilon \nu x'+x+\epsilon x^3=0$. I try to solve it using a method of multiple scales. So $x=x(t)=x(T_0,T_1,T_2,...,T_n)$, where $T_i=\epsilon^i t$. Then $\...
0
votes
0answers
45 views

How to Solve a Differential Equation System Depending on Variable Solved in an Implicit Function?

I have an ordinary differential equation system need to be solved by using Mathematica. $\frac{dk(t)}{dt}=((1-\kappa(t))k(t))^{\alpha}(1-\frac{\kappa(t)}{\kappa(t)+\frac{1-\alpha}{\alpha}\frac{\eta}{\...
0
votes
0answers
55 views

How to solve this NDSolve problem in Mathematica?

I found a confused problem in solving a ODE problems with NDSolve in Mathematica, the code is as follows: I have tried 'Clear[Derivative]' and restart the kernel but these methods don't work. Here ...
3
votes
1answer
52 views

How to utilize a Pick[] command in a differential equation

The code below is a simplified example of a problem I am working on. I first define a relation V that depends on x[t] and ...
0
votes
1answer
32 views

NDSolve output - ParametricPlot not plotting

I cannot understand why I cannot reproduce an example given in the NDSolve command help. Namely I would like to plot the steepest ascent path on the surface $z = x^2-y^2$, starting from the point $(0,...
1
vote
1answer
41 views

Context issues when using NDSolve and rule substitutions in a package [duplicate]

I have a .wl package and a demo .nb notebook. The package file is testPackage.wl and it ...
0
votes
0answers
32 views

Solving a system of equations with a specific shape of the solutions

I have a system of four equations, which are: ...
0
votes
1answer
40 views

Why is this NDSolveValue function remembering past inputs?

I have been attempting to generate a function that uses NDSolveValue to return the value of a solution to a system of ODE's when an event condition is triggered, as a function of the initial ...
4
votes
2answers
256 views
0
votes
0answers
38 views

Why do I get a blank graph when using Manipulate with NDSolve?

I'm trying to model an SIR model using the Manipulate function so that I can change the parameters. Although, when I enter in the following code: ...
2
votes
1answer
43 views

Find x at a given t and f(x,t) == constant from a system of coupled PDE

Is it possible to find the speed of a moving front (produced by the below code) in which modulating beta changes the speed of the front? Basically, I am trying to map the x-values of f(x,t)=0.5 ...
1
vote
0answers
78 views

Problems with the eigenvalues calculated using NDEigenvalue

I'm trying to solve a Sturm-Liouville problem like $\qquad -\psi''(z)+(\frac{1}{z}+2\,z)\psi'(z)=\lambda\,\psi(z)$ using NDEigensystem in order to learn how to ...
0
votes
1answer
52 views

Implicit piece-wise function in derivative for differential equation solver

I want to set up a model/simulation that involves numerically solving a set of coupled differential equations, but at some point in time I want some of the variables to quickly jump to a constant ...
0
votes
1answer
85 views

Adding a limit in NDSolve to avoid division by zero

I'm trying to solve a set of differential equations in which one of the functions that describe the time derivative gets values which make it divide by zero ...
20
votes
2answers
2k views

Wrong answer from DSolve when solving a differential equation

Bug introduced in 12.0.0 I was trying to solve the following differential equation: $$\frac{dy}{dx}=x^2+y^2-1 \quad \text{and} \quad y(0)=1$$ and I used the code below: ...
0
votes
0answers
38 views

Manipulate plot of a system of PDEs with NDSolve

Modeling 1D diffusion of an enzyme, e, through a sphere with substrate, s, I arrive at the below equations: I then pass these equations to NDSolve, Evaluate at a range of r and t and Plot and ...
1
vote
0answers
59 views

Why doesn't Mathematica find solution for differential equation when Wolfram Alpha does?

I need to solve differential equation: dy/dx=tan(1/2*(Pi/2+arctan((|3tan(35*Pi/180)-x|)/(y+3)))), y(0)=0 Wolfram Alpha gives me the output in shape of plot and I need to get the formula used by ...
0
votes
1answer
57 views

Why is NDSolve not working for the given system?

I'm trying to find the solution curves for a system of differential equations. In order to try to complete this task, I've attempted to use NDSolve, but I get an error that says that there are fewer ...
0
votes
0answers
41 views

DSolve help - List encountered within

I'm reading through a physics paper (it's for the displacement of skyrmions in a 2D lattice) and just wanted a little help in visualizing an equation that is shown: $$0=\mu \nabla^2\vec{u}+(\lambda +\...
3
votes
2answers
72 views

Solution to eigenvalue BVP using NDEigensystem to high precision

I'm trying to solve linear (non-self-adjoint) boundary-value problems to as high precision as possible (optimally 1e-15). For example, the below code solves for the first 5 eigenvalues of the harmonic ...
0
votes
0answers
21 views

Is there a way to find the analytical solution of the PDE containing mixed derivative?

In this equation $A$ and $B$ are constants. I want to find the analytical expression for this. Please let me know if it's possible to do this in Mathematica. Also, Are there any other conditions that ...
0
votes
0answers
49 views

Solving numerically an initial value problem on an unbounded domain

I wish to solve the pde: $$-\frac{1}{1-t}\partial_x^2\phi+t^4(1-t)\partial_t^2\phi-t^4\partial_t\phi=\mu^2 \phi,$$ with initial conditions $\phi(x,0)=\cos(\mu x)$ and $\dot{\phi}(x,0)=0$ for some time ...
1
vote
2answers
95 views

Both DSolve and NDSolve fail for a simple system of two PDEs

Using Mathematica 10.4.1, I'm trying to solve some simple (I think!) partial differential equations with a form more or less like this: $\qquad \frac{\partial v}{\partial t} = b v\;, \quad \frac{\...
3
votes
1answer
204 views

Solution of Burgers equation with some initial data

Consider the Burgers equation $$\partial_t u + \partial_x\left(u^2/2 \right) = 0, \quad u(0, x) = u_0(x).$$ eq = D[u[t, x], t] + D[u[t,x]^2/2, x] == 0 How ...
0
votes
1answer
43 views

Plot solution of partial integro-differentiatial equation

I would like to plot solution to a differential equation using ParametricNDSolve3D. The indepedent variable f has arguments q and t where q represents angle between 0 and 2pi while t represents time. ...
2
votes
1answer
156 views

Coupled PDEs with second order spatial derivative

I'm trying to solve a system of PDE using NDsolve but the following error accors. NDSolveValue::femcmsd: The spatial derivative order of the PDE may not exceed two. Equations: Qm and Q are ...
1
vote
1answer
28 views

Verify that a PDE is satisfied by a matrix consisting of functions satisfying a different PDE

My problem is as follows: I have two matrices $P$ and $Q$ which are made up of algebraic expressions of a function $q(x,t)$ which solves a somewhat complicated pde, and its derivatives, for example, ...
0
votes
0answers
36 views

Maximizing an integral/Solving the associated Euler-Lagrange equation

Case 1 I have the following integral which I need to numerically maximize. Here $v = v(u)$. $$V = \int_{u_l}^{u_r} du\sqrt{\frac{4}{(1+uv)^2} \frac{(1-uv)^2}{(1+uv)^2}\frac{dv}{du}} $$ The ...
0
votes
1answer
84 views

How to solve this second order differential equation?

The equation is given by: $$ \frac{dv}{du}\left(2 u\frac{1-uv}{1+uv} + u\right) = \frac{v}{2} \frac{d^2v}{du^2} + v\frac{1-uv}{1+uv} $$ I tried using DSolve for ...
2
votes
1answer
85 views

Eigenvalue dependent boundary conditions- mathematica

I am dealing with an eigenvalue problem whose boundary conditions are also eigenvalue dependent. Could anyone please comment whether Mathematica can numerically solve such a problem? For boundary ...
5
votes
2answers
154 views

Solving a heat equation problem

I'm brand new to Mathematica. I am trying to solve a heat equation problem, but I keep getting back the input on the output line. The problem: Consider the equation $\qquad u_t = u_{xx} - 9 ...
1
vote
2answers
141 views

Eigen value solution of coupled ODEs

I want an eigen value solution of following coupled ODEs: But the code showing errors. ...
0
votes
1answer
30 views

Encountered non-numerical value for a derivative at t == 0 [closed]

I am exploring the Swinging Atwood Machine in my theoretical mechanics course. I have derived the following motions of equations and am trying to solve the ODEs with the specified parameters. My goal ...
0
votes
1answer
63 views

Hopf bifurcation for delay prey-predator system

I am trying to plot the Hopf bifurcation of delay system \begin{eqnarray} &&\displaystyle{\frac{dx(t)}{dt}=r\,x(t)\left(1-\frac{x(t)}{k}\right)-\frac{a\,x(t)\,y(t)}{(x(t)+A)}-E\,q\,x(t)},\\[0....
2
votes
1answer
77 views

NDSolve error: what does “It may help to rewrite the PDE in inactive form” mean?

I am trying to solve a set of partial differential equations numerically: ...
0
votes
0answers
60 views

Nonlinear Schrödinger equation

I have the code (taken from Mathematica):: ...
0
votes
1answer
39 views

Unable to get the expression of solution in DSolve

I am trying to solve the 1D Diffusion equation for a sigmoidal function. However I cannot the expression of the solution ...
0
votes
0answers
44 views

Verification of plotted points of intersection and curve orthogonality

A unit circle and tractrix (with differential equations respectively), $$ \cos \phi =y;\, \sin \phi= y $$ and tangent slope $$\phi = \theta +\pi/2 $$ are plotted to verify orthogonality. Due ...
2
votes
2answers
106 views

Solving and plotting an ODE in polar coordinates

I'm super new to Mathematica, but it's the software used at my school, and I'm really trying to get better at it. While I'm new to Mathematica, I'm not new to other STEM topics and am doing some ...
0
votes
1answer
73 views

NDSolve gives unexpected results when using the method of lines

I've been trying to solve the following PDE using the NDSolve function but it seems something is not working properly. The PDE is a the heat equation on polar coordinates and assuming angular simmetry:...
3
votes
1answer
62 views

Evaluating Hough functions by using NDEigensystem on the Laplace tidal equation

Currently I am looking into the use of Mathematica to solve the classical tidal equation of M. Laplace: $$\mathcal{F}\Theta+\gamma\Theta=0$$ whose eigenfunctions $\Theta$ are the Hough functions. ...
1
vote
1answer
65 views

Problem solving PDE with boundary conditions

I have the following PDE: $$ \frac{\partial }{\partial x}\left(G_x \left(\frac{\partial \phi (x,y)}{\partial x}-y\right)\right)+\frac{\partial }{\partial y}\left(G_y \left(\frac{\partial \phi (x,y)}{\...
2
votes
1answer
107 views

Errors in solving coupled pdes

I am trying to solve following coupled PDEs: I am not sure about suitable BCs. ...
6
votes
2answers
330 views

Using NDEigensystem to solve the Mathieu equation

To be able to apply the differential equation capabilities of Mathematica to my graduate thesis, I am trying to apply NDEigensystem to an eigenproblem whose solution I know, but I am having some ...
0
votes
0answers
37 views

Is this second order D.E. is solvable

DSolve[{(2.248*10^12) x^2 y''[x] + (4.496 x - 50.535)*10^12 y'[ x] - (1.17977*10^32) (x^3 Exp[-2 x] y[x] == 0, y[10] == 10^-5.3}, y[x], x] You can use b.c. ...
1
vote
1answer
72 views

NDSolve ERROR: There are more dependent variables, than equations, so the system is underdetermined

I have a question concerning NDSolve and a system of differential equations. I have 4 variables and 4 equations. Why do I get this ERROR :There are more dependent variables, {f[j,p],U[j,p],(f^(0,1))[...
0
votes
1answer
34 views

NDSolve outcome depends on system size?

I tried to solve a simple wave equation numerically and plot the result within the time range t=0...1. Now when I change the tmax in the NDSolve the outcome of my plot (I don't change anything else ...
2
votes
1answer
87 views

Solution of Riccati equation of y'[z]==R(z) y(z)^2+Q(z) y(z)+P(z) type

I have seen that for Riccati equation the solution can be done by DSolve[y'[z] == P[z] + Q[z] y[z] + R[z] y[z]^2, y[z], z] but for my case mathematica fails to ...
1
vote
1answer
34 views

Customizing Streamplot with other plots

I am trying plot vector field of a dynamical system together with highlighting some area using some inequality constraints. My state-variable for vector fields are $x$ and $y$. The following are ...