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

learn more… | top users | synonyms (3)

3
votes
2answers
112 views

Comparison between numerical solution of nonlinear ode and nonlinear ode of second order

Background Let's consider the following initial value problem for nonlinear system $$ \begin{cases} E' &=& 1 - n_e, \\ n_e' &=& -8\,n_e\,E, \end{cases} \tag{1} $$ with the following ...
2
votes
1answer
90 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 ...
3
votes
1answer
86 views

How to calculate an average error between numerical and analytical solution of the PDE?

I have second-order initial boundary value problem. Here's my code returning numerical solution (and plotting it). ...
1
vote
0answers
74 views

Easy way to get the boundary of a geometric object [closed]

I am trying to define von Neumann boundary conditions for a prism. To do so I need the boundary of the geometric object. I can't seem to find an easy way to do this. I have tried to hard code a ...
5
votes
2answers
161 views

How do I animate a bar chart?

Is there any easy way to have an animated bar chart (one where the heights of the bars change with time)? I currently have the following code: ...
8
votes
1answer
163 views

Finite element boundary breaking

I am trying to model a cantilever beam which can vibrate. On the left the beam is clamped. I am largely following user21 here and also the example in help. I start by doing a static beam which works ...
-1
votes
1answer
70 views

Error message when using DSolve

I am trying to solve the differential equation $2y^2 + 2 x y y' + x y^3 y' - 2 x^2 (y')^2 + x^2 y y'' = 0$ I tried ...
1
vote
0answers
49 views

Fitting data using ParametricNDSolveValue and NonlinearModelFit [closed]

I'm trying to evaluate the kinetics of the chemical reaction. For that I need to fit my experimental data to the kinetic equation. These are my steps in Mathematica. ...
0
votes
0answers
34 views

Numerical derivative of a function which solves a nonlinear system of ODEs

My dear friends, I want to study a nonlinear system of ODEs and to plot a function and its derivative which is defined from the functions of the system of ODE. The question is how to find the ...
1
vote
0answers
39 views

how to solve nonlinear partial differential equation of fractional order [closed]

How to solve this equation by using homotopy perturbation method with the help of the riemann liouville integral? Based on homotopy technique, this is as far as I can go. Somebody please help me ...
0
votes
1answer
128 views

NDSolve breaking down

I'm trying to model a situation involving charged sphere in a dynamic electric potential, and find out how the rotational motion of the sphere affects the translational dynamics in two dimensions. ...
5
votes
2answers
103 views

NDSolve: Using time delays in a WhenEvent

I was wondering whether there is a way to use WhenEvent in a system of delay differential equations, for example: ...
1
vote
1answer
112 views

Finite Element Mass and Stiffness Matrices

I am attempting to use the finite element method to solve a vibration problem. I am following user21's answer from here which is very helpful. My problem is that I am confused by the use of the mass ...
1
vote
1answer
70 views

Solving a differential equation with a specified “input vector”

I have the following differential equation: ...
-3
votes
1answer
224 views

system of differential equations in Mathematica

How can I formulate the addressed system of differential equations in Mathematica for to find a general solution for $f[x_1, x_2, x_3, y_1, y_2, y_3]$. ...
0
votes
1answer
128 views

Lyapunov Exponent of DDE

What is the procedure to compute Lyapunov exponent for Delay Differential Equation using Mathematica code? If we consider the famous Mackey-Glass Equation: ...
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
56 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
97 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
153 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
87 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
72 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
126 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
158 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
226 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
129 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
65 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
103 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
122 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
88 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
74 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
58 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
259 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 } ...