# Questions tagged [differential-equations]

The tag has no usage guidance.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
351 views

### MATLAB: solving multiple ODE systems in parallel

I have a system of parameterized ODEs that I would like to solve using MATLAB and its ode45 solver, and was wondering if it is possible to perform such a task in ...
68 views

### How to derive the adjoint sensitivity equations for a least squares objective function gradient

The Problem I would like to determine the gradient of a least squares objective function which depends on a vector of 40 parameters $p$, and the solution of a system of 32 differential equations. In ...
36 views

### How to increase the stability of a DAE solver?

I am trying to solve a set of linear PDEs of the form $$F\left(\vec{y},\frac{\partial \vec{y}}{\partial x},\frac{\partial^2 \vec{y}}{\partial x^2},\frac{\partial \vec{y}}{\partial t}\right)=0.$$ To ...
71 views

### Numerical method for harmonic oscillator with jumping constant

Let $k_1 \neq k_2$ be positive reals, $t_0 > 0$ and consider the following Cauchy problem in $[0,+\infty)$: \begin{cases} y(t) + k(t)y''(t) = 0 \newline y(0) = 1/\sqrt{k_1} \newline y'(0) = 0, \end{...
51 views

### Modelling of Stefan Maxwell equation

I am trying to solve Maxwell Stefan's equation over a membrane to get the transient mole fraction distribution over the membrane thickness 'z'. But somehow I am not able to code it using ODE45, more ...
53 views

### Numerical errors due to terms of the form $\frac{1}{r}$ (r goes to 0 at the boundary) while using finite difference method

I am trying to solve a system of differential equations using finite difference method. There are few terms of the form $\frac{A(r)}{r}$, both $A(r)$ and r go to zero at the boundary. Analytically ...
68 views

### Book Recommendation: Analysis and design of mechanistic models - such as pharmacokinetics or hydrology models

I have been looking at an interesting book "Pharmacokinetic-Pharmacodynamic Modeling and Simulation" by Peter Bonate on pharmacokinetic models: the models of how medical drugs work their way through ...
70 views

### Numerical integration of SDE: choice of $dt$ and algorithm

I am working on the following Stochastic Differential Equation (SDE) in the Quantum Mechanics context: $$dX_{t} = a X_{t} dt + b X_{t} dW$$ where $X_{t}$ is my stochastic varible, $dt$ is my ...
108 views

### How to implement adaptive step size Runge-Kutta Cash-Karp?

Trying to implement an adaptive step size Runge-Kutta Cash-Karp but failing with this error: ...
35 views

### Discretization formula for a system of two differential equations. “Solution to one of these is the initial condition of the other”. In which sense?

Consider the following stochastic differential equation \begin{equation} dy=\left(A-\left(A+B\right)y\right)dt+C\sqrt{y\left(1-y\right)}dW\tag{1} \end{equation} where $A$, $B$ and $C$ are parameters ...
101 views

63 views

176 views

### Solving complicated coupled ODE using RK4/ODE45 in Matlab

I have the following coupled differential equations also known as Guiding Center Approximation. It is used to explain the position- and velocity change of particles (electrons and protons, N = 1000) ...
94 views

### Code for solving the heat equation on the semi-infinite rod

Cross posted in mathematica.SE. Question : I want to test the solution which is given below is right by Matlab/Maple/Mathematica. Please look the post in mathstackexhange or Please look below. ...
175 views

68 views

### Applying boundary Conditions on FEM

I have a partial differential equatons as shown below. $$\dfrac{d}{dx}((1+x)\dfrac{du(x)}{dx})=0$$ With the following boundary conditions. $$u(0)=0, u(3)=10$$ To solve it using FEM, I multiplied the ...
12 views

Let $H$ be an Hamiltonian and denote $\vec{H}$ the associated Hamiltonian vector field. I am interested in solving numerically the following problem $$\dot z(t) = \vec{H}(z(s),t_1,\ldots, t_p) \... 0answers 54 views ### How to solve odd-order differential equations in FEM? Petrov-Galerkin? I've recently learned about using weighted residuals with the Galerkin method to numerically approximate even-order differential equations (for linear elements, I'm still a beginner). It seems for odd-... 0answers 70 views ### How one can simulate a system given by differential equation? I want to simulate a diffusion environment given by the differential equation$$\frac{\partial u(x,y,t)}{\partial t}=D\left(\frac{\partial^2 u(x,y,t)}{\partial x^2}+\frac{\partial^2 u(x,y,t)}{\...
Let us think on the Poisson equation $\nabla^2 u(\bf{x})=\rho(x)$ with Neumann boundary conditions, with $\bf{x}=\it (x,y)$ in 2D. Here is a stencil with central differences in both $x$ and $y$ (...