# Tagged Questions

Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.

281 views

### Find solution of nonlinear ODE in terms of JacobiCN

I am trying to find a specific solution for this differential equation: $-\frac{1}{2}\frac{d^2}{dx^2}\psi(x)-2k \; \psi(x)^3 + \frac{1}{2}k^2\; \psi(x)=0$ MMA gives me a solution in the form of a <...
92 views

### Solving PDE for a parametric function, using ParametricNDSolve

I've to solve a $4 \times 4$ matrix PDE which involves the following matrices: ...
111 views

### NDSolve with two parameters

I was trying to solve a ODE numerically. It has two parameters (w and z0) which I want to vary. The following code gives an ...
119 views

### Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered

I am somewhat new with Mathematica, and I am doing a spherical pendulum example to improve my skills. However, When I try to use NDSolve and Plot, I get the following errors: Infinity::indet: ...
85 views

### Solving a second order ODE numerically

I am trying to solve the following second order linear ODE numerically (for small w, say) y''[x]+ D[f[x],x]/f[x] y'[x]+ w^2/(x^2 f[x])^2 y[x] == 0 where, ...
85 views

### Is it possible to avoid the singularity problem of a 2nd order differential equations by restricting the solution range?

I would greatly appreciate your help in implementation of Mathematica for solving a 2nd order differential equation expressing some important engineering problem. Apparently, this equation has no ...
132 views

### Trying to model a system of differential equations for outbreaks

I have this SEIR system of differential equations for modeling pandemics ...
223 views

### PoincareSection for a driven damped pendulum is not generating a Poincaré section at all, why?

So I have the general code from the PoincareSection documentation that is changed up for a Driven Damped Pendulum: ...
108 views

### Solving matrix PDE with a range of free parameters

I've a matrix PDE which looks like, $$\partial_r M(r,k) = M(r,k) \, A(k) \, M(r,k) \, + B(k) \quad, \quad \lim_{r \rightarrow 0} \, M(r,k) = C(k)$$ Here $M,A,B,C$ are all $4\times4$ matrices and ...
72 views

### NDSolve Dankwerts boundary conditions with changing discrete variable

I'm modeling a advection-diffusion-reaction plug flow reactor (2nd order ODE) at steady state: $$0=-v \frac{\delta p[z]}{\delta z}+D\frac{\delta ^2 p[z]}{\delta z^2}-k p[z]$$ With Dankwerts boundary ...
98 views

### Get value from InterpolatingFunction

I'm trying to find My[t], Mx[t] and Mz[t] values when evaluated at ...
301 views

### Piecewise imposes internal boundaries in NDSolve - is this expected?

In the following code I used True as the predicate for DirichletCondition and found that the boundary condition was applied not ...
201 views

### Series solution of the Lane-Emden equation

I have the following problem: I'd like to show how the Lane-Emden equation would look like if someone would solve it as a series. Here's the code: ...
73 views

### Cylindrical Coordinates with NDSolveValue [closed]

Can anyone help me figure out how to set up a solution for NDSolveValue that incorporates the use of Cylindrical Coordinates. I tried using SetCoordinates[Cylindrical] but it is not working (as in it ...
68 views

### Help needed, building a trajectory model [duplicate]

I'm trying to build a trajectory model that considers air-friction. The first step, I reckon is to find the Function of both vertical and horizontal displacement with time, then I can use ...
298 views

258 views

### Constant Heat Flux Boundary Condition for the Differential Heat Equation

I am attempting to solve the transient heat equation for a very simple geometry and I am getting a junk solution. I have identified two distinct regions (wall and super-heated fluid layer) with their ...
400 views

### Numerical solution of Schrödinger equation

I want to solve the following differential equation numerically. The geometry of the problem is as shown below. Electron 1 is located on the inner ring of radius $R_1$ and electron 2 is located on the ...
101 views

### About NDSolve with piecewise inputs

I am trying to solve numerically two differential equations with NDSolve. ...
197 views

### FindFit with a sophisticated function (integral)

I am trying to find a fit to the distribution function (empiricial data) in terms of a function which is itself an integral of a product of two simpler functions (two polynomials), that is the model. ...
54 views

### Setting an upper limit in the NDSOLVE calculations

I have built a code to solve a system of differential equations in the form: $\displaystyle \frac{d(AB)}{dt}=kn(A)n(B)$ Here I present a small version of it: ...
158 views

### Error from NDSolve “Cannot find starting value for the variable”

I need help regarding this code. I have used NDSolve to find a solution. ...
173 views

### solve tricky nonlinear ODE on a grid

I've been working on the same question for a while now and would appreciate any advice on what I'm doing wrong or any direction on how to actually solve the problem. :) On xzczd's advice, I retried ...
71 views

### Adding algebraic functions to NDSolve

I want to define an integral function which depends on a system of ODE and is also used to NDSolve the ODEs. ...
59 views

### Setting a One Dimensional Function Equal to a Constant over a Specific Range

I am trying to take the output from NDSolve and create a variable equal to the solution except for a certain range of values. Here is the code I am trying to use ...
87 views

### Applying method of dominant balance directly to an equation

The non-linear equation $y''(x) = \sin k x y$ for $k\in \mathbb R$ cannot be solved analytically to yield a closed form solution. However, by applying the method of dominant balance one may obtain ...
379 views

### Using Grad, Div, etc in polar coordinates

I'm trying to use the newish functions Grad and Div to work with a PDE with circular or spherical symmetry and getting what looks to me like a wrong result. However, I'm not sure of this--perhaps I ...
302 views

### Getting errors NDSolve::nlnum, NDSolve::icfail)

I would like to plot the function v[r], and resolve this differential equation in spherical simmetry: ...
103 views

### How to plot vector field on a circle

I want to plot 1) vector field on a circle for the nonlinear equation and 2) theta dot and theta for different values of mu for the equation ...
179 views

### Dimensions problem with NDSolve

I'm having a difficulty to NDSolve a ODE due to the dimensions problem (according to the error message). Below is the code I have. First of all are functions: <...
129 views

### For loop to perform a shooting search in NDSolve

First comes the disclosure: I am very new to Mathematica and not so much a numerical guy in general. I am having a hard time using the for loop routine in Mathematica the correct way as well as ...
80 views

### From non-linear homogeneous DAE to linear state-space form

I have a non-linear homogeneous DAE $x' = F(y)$, $G(y) = 0$ where $x$, $y$ are vectors, $F$ is linear with constant coefficients, and $G$ is a polynomial with parametric coefficients. How can I ...
80 views

### Undetected WhenEvent with NDSolve

I was considering the following piece of code ...
32 views

74 views

### Can I tell DSolve to solve a first-order ODE by method of separation of variables?

I meet a first-order ODE $$\frac{dy}{dt}=\frac{a(\ln\frac{1-c}{1-y})^3}{\frac{b-y}{1-y}+\ln\frac{1-c}{1-y}},$$ where $a,b,c$ are constants. The ODE is subjected to the initial condition $y(t=0)=y_0$. ...
91 views

### How to solve boundary value problem with singularities at boundaries?

I have a boundary value problem, solving a system of differential equations with a singular boundary condtion (V[0] = 1/s, s->0) ...