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

learn more… | top users | synonyms (3)

2
votes
1answer
57 views

Solving ODE in power series about infinity

I want to solve a particular ODE in power series of 1/x. I can obtain the power series solution about x=0. Can any one suggest how to obtain a series solution in 1/x for the following ODE? I tried ...
1
vote
1answer
83 views

Solution of Poisson equation with two regions

I'm trying to figure out how is possible to solve a Poisson equation $\nabla\cdot[d(x,y)\nabla u]+1=0$ where $d(x,y)$ equals 1 in one region and 2 in another one. Let say I have homogeneous ...
1
vote
1answer
54 views

Error with NDSolve when used for a nonlinear system of PDE's

I am trying to solve the following system of Hamilton-Jacobi PDE's: $ V_1,_t - 0.5 V_1,_x^2/(1 - 0.2x)^2 + V_1,_x(0.1x^2+0.03x+.0.01)/(1 - 0.2x)+0.03(x-0.5)^2-V_1,_x V_2,_x/(1 - 0.2x)^2=0$ $ V_2,_t - ...
0
votes
1answer
94 views

Reflective and Constant Flux Boundary Conditions

Can anyone tell me how I can use NDSolveValue to model reflective and constant heat flux boundary conditions. I am solving the heat equation. Essentially I have a ...
2
votes
1answer
104 views

Simple code to write differential equations in a matrix formulation

Is there a simple code to transform the following differential system equations : ...
1
vote
1answer
52 views

Error in NDSolve

I want to solve this nonlinear equation in the "NDSolve". The matrixs of this equation are defined as below. ...
1
vote
1answer
66 views

Solution of Inverse parametric implicit functions [closed]

Using NDSolve I solved for functions $G={x,y,u,v}$ that are functions of $t$ \begin{eqnarray} y'(t) &=& f(x) \\ x'(t) &=& g(y) \\ u'(t) ...
4
votes
1answer
224 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
72 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
86 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
71 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
82 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
80 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
125 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
156 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
87 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
59 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
91 views

Get value from InterpolatingFunction

I'm trying to find My[t], Mx[t] and Mz[t] values when evaluated at ...
13
votes
3answers
222 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
128 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
63 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
65 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
141 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
44 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
106 views

Solve Differential Equations with Boundary Condition at Variable Point

I have a set of differential equations: ...
3
votes
1answer
101 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: ...
3
votes
1answer
121 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
37 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
222 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
87 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
73 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
56 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
257 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
127 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
358 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
68 views

About NDSolve with piecewise inputs

I am trying to solve numerically two differential equations with NDSolve. ...
3
votes
3answers
174 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
50 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
92 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
156 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
61 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
54 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
73 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
295 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
134 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
70 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
100 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
107 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
54 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
57 views

Undetected WhenEvent with NDSolve

I was considering the following piece of code ...