Questions tagged [differential-equations]
For questions about solving, analyzing, or creating differential equations to model some system. If possible, include specific tags about the type of differential equation (e.g. [tag:pde], [tag:ode], [tag:stochastic-ode]).
27
questions
1
vote
1
answer
51
views
Solving TOV equations that describes neutron stars in modified f(R, T) gravity
Sorry for the long post, tldr at bottom.
I'm trying to use standard RK4 code in C/C++ to solve a coupled system of 2 modified TOV equations in f(R,T) gravity and reproduce some of the results of this ...
5
votes
1
answer
344
views
Time integration of first-order ODE with higher-order information
Suppose I wish to derive a numerical integrator for the first-order ODE $$x'(t)=F(x(t)).$$ By differentiating both sides of the expression in $t$, I can write a second-order relation also satisfied ...
1
vote
1
answer
74
views
Moving least square method in finite volume method
Consider a differntial equation like : $\nabla .(\nabla u)=cte$, using finite volume method we can write $\int\nabla .(\nabla u) dv =\int n.(\nabla u) dA $. Here we want to use the moving least square ...
1
vote
1
answer
202
views
Numerically solving the Advection-diffusion equation with no-flux boundary condition leads to violation of mass conservation
I am trying to solve numerically the advection-diffusion equation of the following form
$$\frac{\partial C}{\partial t}=\alpha\frac{\partial^2 C}{\partial x^2}+\beta \frac{\partial C}{\partial x}$$
...
3
votes
0
answers
135
views
Galerkin Method - Why does integration-by-parts eliminate need to enforce Neumann boundaries?
I've posted this to MathStackexchange but I figured I'd also post here as well as I have yet to receive an answer on my original post, and that I would be more likely to encounter users of the ...
1
vote
1
answer
112
views
Can I combine the backward and forward euler methods - simialr to modified euler method?
Constructing Modified Euler
Using the same strategy as done in the construction of Modified Euler. Starting from Trapezoidal Method
$$y_1 = y_0 + \dfrac{h}{2}\left(f(x_0,y_0) + f(x_1,y_1)\right)$$
...
0
votes
0
answers
24
views
Help in solving Quintessential scalar field using Steep Potential in cosmology
I am attempting to solve the differential equation $\ddot\phi + 3H\dot\phi + \dfrac{dV}{d\phi} = 0.$
For $V(\phi) = V_{0}e^{-\lambda\phi}$, where $V_{0} = 0.7$, $\lambda = 0.1$ and $V'(\phi) = \dfrac{...
0
votes
0
answers
69
views
Solving coupled 2nd-order differential equation
I would appreciate it if you could help me solve the following coupled equation numerically
$$
[-\frac{1}{2} \partial_r^2 + v_0(r) -E]\psi_{\ell} + v_1(r) \psi_{1-\ell}(r) = 0,
$$
where $\ell = 0 , 1$ ...
0
votes
0
answers
88
views
Unable to solve numerically this system of differential equation
I'm trying to obtain the graph of x(y) from the following system :
Therefore I tried to solve this system using an Euler Method :
...
1
vote
1
answer
139
views
Best finite difference scheme in 2D for the mixed derivative
The are good methods to deduce finite difference schemes for derivatives of functions of one variable. But how to get a good one for the mixed derivative of a function of two variables $u=u(x,y)$, ...
1
vote
0
answers
125
views
How to vectorise numerical differentiation
I have a 2-D matrix with 2 spatial coordinates and I want to be able to vectorise the process of numerically differentiating with respect to its 2 coordinates, rather than just looping along the rows ...
2
votes
1
answer
103
views
Numerical calculation of Lyapunov exponents using SciPy's built-in solve_ivp
I have previously successfully implemented the QR decomposition method in MATLAB to calculate Lyapunov exponents for Lorenz equations. See here.
This method integrates the stacked system, i.e. the ...
1
vote
1
answer
122
views
Step size constraint in Euler backward
I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on ...
1
vote
0
answers
45
views
Solution to the Liouville-Gibbs equation
What would be the approach to numerically solve for $\rho(x,t)$ the following equation with some initial conditions
$$\frac{\partial\rho}{\partial t}
+\sum_{i=1}^n\left(\frac{\partial(\rho g_i)}{\...
1
vote
0
answers
40
views
Implementation of operator splitting method for Wigner equation
I am dealing with the integro-differential equation for Wigner function,
$$\frac{\partial f}{\partial t}+p\frac{\partial f}{\partial x}+\\+\frac{1}{\chi}\left\{\int_{-\pi}^{+\pi}dy\,\int_{-\infty}^{+\...