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
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 ...
0
votes
1answer
91 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 ...
9
votes
1answer
460 views

Solver for unsteady flow with the use of the Navier-Stokes and Mathematica FEM

There are many commercial and open code for solving the problems of unsteady flows. We are interested in the possibility of solving these problems using Mathematica FEM. Previously proposed solvers ...
3
votes
2answers
74 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 ...
1
vote
0answers
63 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
61 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 ...
3
votes
1answer
188 views

Boundary value problem for 2 coupled ODE's using NDSolve: “singularity or stiff system suspected”

I'm trying to solve a pair of coupled ODE's. I need to place four Dirichlet boundary conditions (at R = 0 and R = ∞ for each ...
1
vote
1answer
63 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: ...
0
votes
0answers
45 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 +\...
0
votes
0answers
75 views

Numerical methods to solve an ODE with discontinuous coefficients

Consider the ODE $$\partial_t \Phi(t,x) = \mathbf b(\Phi(t,x)), \qquad t \in [0,T], \quad x=(x_1,x_2) \in \mathbb{R}^2$$ $$\Phi(0,x) = x, \quad x \in \mathbb R^2,$$ where $\mathbf b = (0,\chi_{\{x_1 \...
1
vote
1answer
71 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)}{\...
3
votes
2answers
354 views

Exact Differentials

I just started using Mathematica so my apologies if this is a very basic question. I tried to find related questions on this forum but couldn't, so here goes. I have an equation, $\quad \quad dp =\...
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
56 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
96 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
214 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
0answers
39 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
48 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. ...
0
votes
1answer
70 views

Using ParametricNDSolve with n subscripted functions

I want to calculate trajectories of an n-pendulum. For the number n=1 it's just a pendulum, for n=2 a double pendulum , for n=3 a triple and so on. The Solver has to solve n equations for the angle. ...
1
vote
2answers
143 views

Eigen value solution of coupled ODEs

I want an eigen value solution of following coupled ODEs: But the code showing errors. ...
1
vote
1answer
29 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, ...
2
votes
1answer
90 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 ...
3
votes
2answers
734 views

Finding terms of the perturbation solution

I've got a task to find first three terms of the perturbation series solution to: $$y' = 1 +(1+\epsilon)y^2,\quad y(0)=1, \quad t > 0,$$ for a small $\epsilon$. I am supposed to use Mathematica ...
0
votes
1answer
86 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 ...
10
votes
3answers
453 views

Solving an integro-differential equation with Mathematica

I try to solve a nonlinear integro-differential equation with this code. Here i used a periodic condition. ...
5
votes
2answers
163 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 ...
2
votes
1answer
92 views

Solving for the recursion relation for the expansion coefficients of the asymptotic expansion of an ODE

I want to solve for the asymptotic solution of the following differential equation $$ \left(y^2+1\right) R''(y)+y\left(2-p \left(b_{0} \sqrt{y^2+1}\right)^{-p}\right) R'(y)-l (l+1) R(y)=0$$ as $y\...
5
votes
2answers
378 views

Numerical methods to solve a continuity equation

What numerical methods can be used to study the initial value problem for the continuity equation where $ u = u(t, x) $ $$ u_t + \nabla\cdot(\boldsymbol b u) = 0, \qquad t \in [0,T], \quad x=(x_1,x_2)...
2
votes
2answers
109 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 ...
2
votes
1answer
85 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
1answer
32 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
66 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....
5
votes
1answer
172 views

Why this PDE causes internal 1/0 division?

Bug introduced in 11.3 and persisting through 12.0.0 In 11.2 DSolve return unevaluated. Assigned WRI case number 4210941 Using 11.3 on Windows 10, this input <...
0
votes
0answers
62 views

Nonlinear Schrödinger equation

I have the code (taken from Mathematica):: ...
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 ...
6
votes
0answers
106 views

Where is 1/0 coming from in this call to DSolve?

Bug introduced in 11.3 or earlier and persisting through 12.0 Report to WRI [CASE:4246236] This is using 11.3 on windows 10. This is a pde from Handbook of first order partial differential ...
3
votes
1answer
197 views

Boundary conditions are not satisfied with NDSolve

I want to study the time evolution of a small perturbation around the static solution of the following Wave Equation $$ -\partial_t^2 v(t,r) + \partial_r^2v(t,r) + \frac{2}{r}\partial_r v(t,r) = \...
3
votes
1answer
63 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. ...
6
votes
2answers
337 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 ...
1
vote
1answer
79 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))[...
4
votes
1answer
814 views

Choosing FEM element type and mesh refinement

I have only recently been introduced to Mathematica's(v10.0) FEM capabilities. I understand that for solving PDEs on non-uniform shapes via NDSolve, Mathematica ...
2
votes
2answers
126 views

Solving 2D Reaction-Diffusion with Explicit Euler Method

I am trying to solve this following 2D-Diffusion equation (I wrote it in Word, so it looks nice) (Note: I am solving this for a 100x100 mesh point) I tried to solve the above equation using the ...
0
votes
1answer
35 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
107 views

Errors in solving coupled pdes

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

Using NDEigensystem to solve coupled eigenvalue problem

I want to find the Eigenvalues and Eigenfunctions for the following Eigenvalue problem I tried to solve this numerically ...
2
votes
1answer
93 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 ...
0
votes
0answers
39 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. ...
0
votes
1answer
61 views

Could not solve this equation by Solve and also get nearly correct plot by Wolfram|Alpha [closed]

Input: Solve[y'[x] == -(224.8 ((y[x]^2 - y[x]/10^11 - (0.000010385 x^3)/E^(2 x))/x^2)), y[x], x] Output: ...
5
votes
1answer
815 views

Mathematica 3D Heat Equation Solution

I've been working on trying to analyze the Heat Equation in water both experimentally and theoretically. The model goes as: there's a cuboidal bath (of say, 15x7x5 inches) filled with water, and an ...