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

learn more… | top users | synonyms (3)

5
votes
1answer
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 <...
1
vote
1answer
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: ...
2
votes
1answer
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 ...
0
votes
0answers
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: ...
0
votes
0answers
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, ...
1
vote
1answer
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 ...
6
votes
1answer
132 views

Trying to model a system of differential equations for outbreaks

I have this SEIR system of differential equations for modeling pandemics ...
8
votes
1answer
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: ...
2
votes
1answer
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 ...
2
votes
1answer
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 ...
1
vote
2answers
98 views

Get value from InterpolatingFunction

I'm trying to find My[t], Mx[t] and Mz[t] values when evaluated at ...
13
votes
3answers
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 ...
5
votes
2answers
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: ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
298 views

How could I solve this Reaction-Diffusion PDE using mathematica?

I'm modeling a problem with PDEs, So I gotta solve numerically this Reaction-Diffusion Partial Differential Equation $$ \frac{\partial u(t,x,y)}{\partial t}=D\Big( \frac{\partial^{2}u(t,x,y) }{\...
0
votes
0answers
51 views

Fail to implement region specification in NDSolve - Misreading the doc?

Potentially simple, but I fail to implement it. Consider the following example: ...
3
votes
1answer
118 views

Solve Differential Equations with Boundary Condition at Variable Point

I have a set of differential equations: ...
3
votes
1answer
141 views

PDE with Initial and Boundary Conditions [closed]

First I would like to say that I'm a novice at Mathematica. I'm trying to solve a second order PDE with simple initial and boundary conditions but I keep getting two errors messages: Warning: ...
4
votes
1answer
141 views

Derivation of numerical scheme for linear transport equation on a variable stencil

The question is about automatica derivation of coefficients of numerical scheme on a variable stencil. So, lets consider 1d transport equation \begin{equation} (1)\qquad u_t+u_x=0. \end{equation} To ...
1
vote
1answer
59 views

Problem with DSolve function argument [closed]

today when i try this DSolve[{y'[x] == y[x]^2 *Cos[x]}, y[x], x] i think i'v already argument the function y, but still got: ...
6
votes
2answers
267 views

Solving the path of Earth around Sun

This maybe isn't a universally helpful question. Maybe a little of a code dump. But here goes. I'm trying to solve the path Earth moves around Sun from Earths mass, Suns mass, Earths initial velocity ...
-2
votes
1answer
171 views

How can I solve a third order nonlinear differential equation (Falkner Skan boundary)? [closed]

{f'''[x] + (m + 1)/2 f[x] f''[x] + m (1 - f'[x]^2) == 0, f[0] == 0, f'[0] == 0, f''[0] == γ} Beta = 0; m = 0;
1
vote
1answer
84 views

Nonlinear 2nd order ODE with regular singularities

I am tring to solve the following ODE with NDsolve $2x~(1-x)~f''(x)+(3-4x)~f'(x)+a~f(x)+b~f^n(x)=0;~~a,b\in\mathbb{R},~n\in\mathbb{N}$. The mathematica "code" is: ...
3
votes
0answers
83 views

Equilibrium solution to system of 4 ODEs with 6 parameters [closed]

I have the following system of 4 ODEs of 4 state variables $(M_{U},M_{R},F_{N},F_{M})$ and 6 parameters $(\alpha,b,\gamma,\mu_{M},\delta,\mu_{F})$ that I am trying to find the equilibrium solution for:...
6
votes
1answer
301 views

Shooting Method in Mathematica

I am trying to solve the following equations in Mathematica 10 $$\frac { { d }^{ 3 }f }{ { d\eta }^{ 3 } } +3\, f \frac { { d }^{ 2 }f }{ { d\eta }^{ 2 } } -2{ \left( \frac { df }{ d\eta } \right)...
2
votes
1answer
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 ...
1
vote
1answer
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 ...
2
votes
1answer
101 views

About NDSolve with piecewise inputs

I am trying to solve numerically two differential equations with NDSolve. ...
3
votes
3answers
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. ...
2
votes
1answer
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: ...
0
votes
1answer
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. ...
3
votes
0answers
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 ...
1
vote
1answer
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. ...
3
votes
1answer
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 ...
5
votes
0answers
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 ...
6
votes
3answers
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 ...
2
votes
1answer
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: ...
1
vote
1answer
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 ...
2
votes
1answer
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: <...
4
votes
1answer
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 ...
1
vote
1answer
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 ...
2
votes
1answer
80 views

Undetected WhenEvent with NDSolve

I was considering the following piece of code ...
0
votes
0answers
32 views

Fluctuations as initial conditions

I have two coupled partial differential equations in $u(x,y,t)$ and $v(x,y,t)$. I would like to set the initial conditions as fluctuations around some numbers, say, $4$ and $6$, for $u(x,y,0)$ and $v(...
2
votes
1answer
49 views

ndsolve interpolatingfunctions not shown/evaluated

Using this technique from Simon, I want to solve a matrix differential equation with a matrix that contains an explicit time-dependence(our variable), but I want to be able to solve this problem for a ...
1
vote
1answer
220 views

Periodic boundary condition

I want to solve a PDE as: $\frac{\partial u}{\partial t}=\frac{\partial u}{\partial x}$, with conditions: $u(x,0)=sin(\pi cos(x))$ and $u(x+2\pi,t)=u(x,t)$. I have solved it by hand and obtained: $u(...
0
votes
1answer
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$. ...
0
votes
0answers
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) ...
5
votes
3answers
213 views

If statement within WhenEvent

I'm trying to integrate an equation with a periodic solution using NDsolve. I want to stop the integration after the derivative of my solution has become zero for ...
2
votes
1answer
111 views

Boundary condition not fully taken into account in DEigensystem?

Context Mathematica 10.3 now has the very nice DEigensystem function. ...