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

learn more… | top users | synonyms (3)

1
vote
1answer
81 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
131 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
210 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
99 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
66 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
96 views

Get value from InterpolatingFunction

I'm trying to find My[t], Mx[t] and Mz[t] values when evaluated at ...
13
votes
3answers
268 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
178 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
69 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
67 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
199 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
48 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
112 views

Solve Differential Equations with Boundary Condition at Variable Point

I have a set of differential equations: ...
3
votes
1answer
127 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
134 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
48 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
256 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
139 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
78 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
72 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 ...
6
votes
1answer
283 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 } ...
2
votes
1answer
203 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
384 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
91 views

About NDSolve with piecewise inputs

I am trying to solve numerically two differential equations with NDSolve. ...
3
votes
3answers
180 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
53 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
132 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
168 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
68 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
58 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
81 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
347 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
220 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
89 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
134 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
121 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
68 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
69 views

Undetected WhenEvent with NDSolve

I was considering the following piece of code ...
0
votes
0answers
30 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 ...
2
votes
1answer
46 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
152 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: ...
0
votes
1answer
72 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
77 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
200 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
105 views

Boundary condition not fully taken into account in DEigensystem?

Context Mathematica 10.3 now has the very nice DEigensystem function. ...
3
votes
2answers
390 views

Solve stiff system by shooting method

I'm trying to solve a second order differential equation with the shooting method but, it appears to be a stiff system. This is worst for a larger parameter $\mu$. I've tried different methods: ...
10
votes
3answers
512 views

Trying to find the asymptote to a function

I am trying to find the asymptote to a solution of a differential equation. I solved $x'(t) = \sin(x(t) + t)$ using NDSolve and plotted my solution. ...
1
vote
0answers
42 views

Combining Manipulate and NDEigenvalues [closed]

I think there may be a quick solution to this problem which I can't seem to fix at the moment. The question is how do we eliminate the error in the following ...
1
vote
1answer
111 views

NDSolve : Second order ODE with variable coefficients

I have a second order ODE of the form : u''[x]+ p[x]u'[x]+ q[x] u[x]==0 ; with, ...
3
votes
4answers
202 views

Finding the “least” singular solution for NDSolve

I need to solve a ODE for a function $f_\sigma(x)$, where $\sigma$ is a free parameter to tune. All the solutions are supposed to be singular for some value of $x$, except one for a given value ...