Ordinary Differential Equations (ODEs) contain functions of only one independent variable, and one or more of their derivatives with respect to that variable. This tag is intended for questions on modeling phenomena with ODEs, solving ODEs, and other related aspects.

learn more… | top users | synonyms

5
votes
1answer
29 views

Projection on Stiefel manifold after integration step

A few days ago, I asked how constraints like $A^T A = I$ can be implemented if one wishes to integrate differential equations of the form $\dot{A}=f(A,t)$. Kirill was so kind to point out that a ...
0
votes
0answers
17 views

How to apply asymptotic matching condition in bvp4c?

I want to know how to write the code to apply asymptotic matching condition? In the paper, it is stated that they apply asymptotic matching condition for the range of ...
3
votes
1answer
87 views

Integration of differential equation with orthogonality constraint

Lets say I have a system of differential equations which has the form $$\dot{C}_{\alpha,\beta,m} = f_{\alpha,\beta,m}(C_{\alpha,\beta,1},\ldots,C_{\alpha,\beta,N};t).$$ The $f$s are some functions of ...
3
votes
0answers
83 views

How to obtain the reduced model from a subspace projection method?

I have a system of ordinary differential equations (ODEs). It is a large system that has dozens of equations and hundreds of parameters. I wish to reduce its size so it becomes computationally more ...
1
vote
1answer
50 views

Solving stiff equations in Mathematica

I have problem to solve stiff equations. Any idea on how to solve this? I have tried "StiffSwitching" but it didnt work. Im solving this using Mathematica 10. Here is my code. Im sorry if I wrote the ...
1
vote
1answer
41 views

Solving second order SDE with Gaussian white noise for first time derivative in Matlab

I'm having trouble solving a second order differential equation with Gaussian white noise. The equation I'm solving follows the form: $$Ax'' + Bx' + \sin(x) = i + i_{n}$$ where $i_{n}$ is the ...
0
votes
0answers
75 views

Solving first order system in MATLAB

I have problem to solve this in MATLAB. The equation already in first order system, yet I still confused to write the code and solve it. Or this equation cant be solved by using bvp4c perhaps? ...
0
votes
0answers
28 views

Shooting method MATLAB upper order non linear ODE [duplicate]

How can I solve a system of nonlinear differential equations using Matlab? I know I need to use the shooting method but how should I do it? I know I have to control the value of f'' so that it ...
2
votes
0answers
48 views

Numerically solving geodesic differential equations with a priori knowledge of the Riemann curvature tensor

The geodesic differential equations are given as \begin{align} \frac{d^2 x^j}{ds^2} + \Gamma^{\phantom{h}j}_{h\phantom{j}k}\frac{dx^h}{ds}\frac{dx^k}{ds} = 0, \end{align} where the ...
1
vote
1answer
140 views

Shooting method - Matlab ODE

I'm trying to solve these equations of hypersonic adiabatic flow over a flat plate. I did all the simplifications and got these equations for the stagnation point flow. $$\left(Cf''\right)' + f f'' = ...
-3
votes
1answer
125 views

How can I solve stiff equations by method of line (MOL)?

I want to solve 7 coupled equations.I use method of line(MOL) and discrete the equation in Length and radius and convert them to a system of ODEs in time.and use ode15s to solve them in MATLAB. But an ...
1
vote
1answer
43 views

Fixed-step ODE solver with variable order?

I am interested in fixed-step simulation of an ODE. The methods I know of are either variable-step with prescribed error tolerance or fixed-step without error control. Are there methods known which ...
9
votes
1answer
147 views

Which numerical methods preserve time reversal symmetry?

If I have a physical system which contains a time reversal symmetry (for example a Hamiltonian $H(x,p)=p^2/2m + V(x)$ with $V(x)$ real) and I want to solve the differential equations which describe ...
0
votes
0answers
28 views

maltab ode solver- user defined criteria to stop calculations

is there a way to add a user defined convergence criteria to an ode solver so that the solution is stopped? I know that Matlab uses absolute and relative tolerances but would that suffice in solving ...
0
votes
0answers
52 views

Matlab help with differential equations [duplicate]

For my coursework I have to model human hair in which I have $$\frac{d^2\theta}{ds^2} = s f_g \cos(\theta)+s f_x \cos(\phi)\sin(\theta)$$ Where $\theta$ is a function of $s$. I am given the ...
8
votes
1answer
114 views

Solving an ODE beyond existence. What's happening?

As an example for an ODE course I used the ODE $$ y' = \frac{y}{x} + \frac{1}{\cos(\tfrac{y}{x})} $$ to illustrate domains of existence. Standard substitution $z=y/x$ turns the equation to $$ z' = ...
0
votes
2answers
163 views

Multiple Coupled Differential Equation solution in Python

I have 4 ordinary differential equations that are coupled. The variables in the 4 equations are functions of time and space and one of them is second order in space. \begin{equation} \frac{ \partial ...
0
votes
0answers
30 views

Boundary conditions shooting method

I am trying to solve the differential equation $\frac{d^{2}y}{dr^2}+(\frac{1}{r}+1)y=0$ with the boundary conditions $y(r) \rightarrow r \frac{dy}{dr}(0)$ as $r \rightarrow 0$ and $y(r) \rightarrow ...
5
votes
1answer
47 views

Solving an ODE while maintaining weak positivity and weak monotonicity

I have a system of $N$ ODEs of the form, $$ M(z,F(z)) \cdot F'(z) = \Phi(z,F(z)) $$ where the mass matrix is $M(z,F): R\times R^N \to R^{N\times N}$ and $\Phi(z,F):R\times R^N \to R^N$ is ...
2
votes
1answer
74 views

BDF methods for implicit-explicit method

Are there BDF formulas like the ones given here but one that can be used with implicit-explicit discretization? The right hand side in those formulas is supposed to be implicitly discretized at the ...
2
votes
0answers
48 views

How can I use ODE events in MATLAB? [closed]

I need to have a better understanding about how to define ODE events. What I know is that if I have my ODE defined as ...
3
votes
0answers
115 views

Spectral Collocation (or Weighted Residual) Methods to solve Stiff ODEs?

I have a system of ODEs which is (at least moderately) stiff. Consider the class of spectral collocation methods https://en.wikipedia.org/wiki/Spectral_method or the related class of weighted ...
0
votes
0answers
77 views

Computing solutions with singularities using MATLAB ODE45

I am new to solving numerically ODES and thus it is difficult for me to judge the reliability/trustworthiness of the results that I have produced for the following problem: I am dealing with a 2nd ...
0
votes
0answers
64 views

Techniques to solve this complicated ODE

I have to solve the following ordinary differential equation: $$A(\rho, \Phi)\Phi'' + C(\rho, \rho', \Phi)\Phi' - D(\rho, \rho')\Phi^2 - \lambda \rho^4 \Phi^3 = 0 \enspace .$$ Here, prime $(')$ ...
1
vote
2answers
109 views

How can one describe the accuracy of a Runge-Kutta method?

I am solving a nonlinear ODE with a regular singularity using MATLAB ODE45 or ODE113. I am wondering what precision and accuracy they have and what one can say about the numerical error. The idea ...
2
votes
2answers
74 views

PDEs appropriate for adaptive time stepping algorithms

I'm looking for some physical phenomena for which an adaptive time stepping algorithm would be ideal. A PDE or ODE that showed very large gradients in time at a small period of time and smoother ...
2
votes
0answers
82 views

ODE events to switch between 5 equations (friction model)

I am modelling a 1 dof spring-mass-damper system with friction. As first attempt I modelled the friction according to the simple Coulomb model (figure A here ...
1
vote
1answer
27 views

Algorithm to Compute Separatrix of Nonlinear ODE

The solution space of a nonlinear ordinary differential equation (ODE) often includes a separatrix that is unstable in the sense that nearby solutions depart exponentially from it. The nonlinear ...
2
votes
0answers
82 views

Solving constrained BVP, singular Jacobian

The boundary value problem is $$ \begin{cases} \dot{x}_i = \begin{cases} (0.5D^{-1}\psi)_i, \text{ if }(0.5D^{-1}\psi)_i \le 0 \\ 0 \text{, otherwise} \end{cases} \\ \dot{\psi} = 2\Sigma x \\ x(0) ...
4
votes
1answer
190 views

Numerical solution of Geodesic differential equations with Python

I have made a solver based on the SymPy.diffgeom library, where I use Scipy.Integrate to solve the following system of second order differential equations : \begin{align} u'' &+ ...
1
vote
1answer
123 views

How can I solve coupled equations by the method of line(MOL)?

I want to solve 3 coupled PDEs equations. They depend on time, radius and length. I used the method of lines (MOL) and converted them to a system of ODEs in time. Now I want to solve them using ...
0
votes
1answer
91 views

How can i define algebraic equation in differential function in MATLAB?

I want to solve 7 pde's that are functions of time, radius(j) and length(i). I used the method of lines and converted them to a system of odes in time and it becomes something like this: ...
0
votes
1answer
81 views

What is the meaning of this error in MATLAB?

Warning: Failure at t=6.137539e-04. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.734723e-18) at time t. In ode15s (line 730) ...
1
vote
0answers
43 views

Time dependent self-consistent equations

I am facing the following problem. I need to solve numerically a set of coupled equations $$i\frac{d}{dt}f_{n}^{(i)}(t) = \left[U\cdot n(n-1) + \mu\cdot n\right]f_{n}^{(i)}(t) - ...
2
votes
1answer
42 views

stirred tank model; DAE versus ODE model

I do have a stirred tank reactor with two inlets and one outlet. Several components enter the reactor at inlet 0 and particles at inlet 1. All component from inlet 0 adsorb on the particles from inlet ...
1
vote
2answers
60 views

Solving nonlinear boundary value problem

I have an ODE of the form $$C_1 d_y u + C_2 (d_y u)^n = C_3 y + C_4$$ with boundary conditions $u(0) = 0, d_y u(L) = 0$, where $C_1 \to C_4$ are known constants, and where $0 < n \leq 1$ is a real ...
1
vote
3answers
153 views

Unexpected results of MATLAB's ode45

Whilst working with MATLAB recently I encountered something odd that I cannot explain. I was using the ode45 solver to solve a system of two coupled second order ODEs. I wasn't convinced about the ...
3
votes
2answers
190 views

Accuracy of numerical methods in finding eigenvalues

I have a problem with assesing the accuracy of my numerical calculation. I have a 2nd order ODE. It is an eigenvalue problem of the form: $$ y'' + ay' + \lambda^2y = 0, $$ and the boundary condiations ...
1
vote
0answers
45 views

should boundary conditions be effecting moving mesh results?

I have a question on the use of moving mesh to solve the inviscid euler equations. I have solved the following equations: $$\frac{\partial}{\partial t}\left[\begin{array}{c} \rho\\ \rho u ...
1
vote
1answer
65 views

Implicit ODE solver with discontinuous derivatives

I want to implement an implicit ODE solver, but don't know what to do when the differential equations (DEs) have discontinuities of the form: More common type: $$\lim_{x\rightarrow ...
3
votes
1answer
66 views

How to perform the sensitivity analyses of ODE with several parameters?

I have the system which is described by several ODE. The solution looks good for me. Now I need to implement the sensitivity analyses of parameters which I used in the model. Therefore, I have the ...
3
votes
1answer
62 views

linear stability analysis using spectral radius

I am analysing the stability of a series of 1D linear equations of the form \begin{equation} \frac{d}{dt} x = A x \end{equation} discretised using upwind and central finite volume methods, etc, with ...
1
vote
2answers
84 views

Inaccurate Derivatives from Adjoint method for ODE-constrained problem

I have this very simple ODE-contrained optimization problem: $h(x,x',p,t) = x'-A(p)x-b(p) = 0$, the constraint $g(x(0)) = x_0$, the initial condition with no parameters involved $F = \int ...
0
votes
1answer
70 views

adjoint method package for ODE(PDE)-constrained optimization

I have this type of question (ODE-constrained optimization) to solve: $g(x,p)=0$ is the simulation, where $x$ is state variable and $p$ is parameters aimed to optimize; $f(x)$ is the objective ...
3
votes
0answers
73 views

Solving an ODE using shooting method

I have been trying to solve the following nonlinear ordinary differential equation: $$-\Phi''-\frac{3}{r}\Phi'+\Phi-\frac{3}{2}\Phi^{2}+\frac{\alpha}{2}\Phi^{3}=0$$ with boundary conditions ...
3
votes
1answer
61 views

Solve implicit ODE numerically in orbit simulation

I'm trying to plot the orbit of a compact binary star system where general relativistic effects become important. I'm using post-Newtonian approximation and I want to solve the orbit numerically based ...
7
votes
1answer
97 views

Forcing an ODE solver to preserve the norm

I have an ODE of the form $$ \frac{dy}{dt} = -i H y \enspace .$$ where $y$ is a complex vector and $H$ is a time dependent Hermitian matrix. The norm of the solution $y(t)$ at any point in time ...
-2
votes
2answers
90 views

Ways to solve numerically differential equations in C [closed]

I have to solve numerically a differential equation in C. The equation is: How can I write some code to solve it? Are there some numerical methods (Runge-Kutta maybe?) to solve it? A colleague ...
-1
votes
1answer
74 views

Is iteration an efficient algorithm in this case? [closed]

My task in numerical analysis is We are interested in finding values of β0 for which z(x) = 2500. Use an efficient algorithm to determine the rays which pass through the receiver. Now I'm ...
2
votes
0answers
41 views

Rank deficient Jacobian in discretized periodic solutions to autonomous ODE

I'm trying to numerically find periodic solutions to different systems of autonomous nonlinear ordinary differential equations. I decided to use a finite difference scheme and solve the resulting ...