0
votes
1answer
41 views

Solving ODE with matrices

I have an equation in ODE $M{'}(x)= M(x)*A(x)$. Issue here is $A(x) = C_1+C_2* x $ where $C_1,C_2 $ has dimension $3 \times 3$. And x is a scalar variable Doubt What is M(x)? Can any one give ...
0
votes
0answers
19 views

Space-dependent diffusivity and finite-differences

I want to implement a finite difference code of this simple diffusion equation with space-dependent diffusivity: $$\partial_{t}u =D\partial_{x}^{2}u+\partial_{x}D\cdot\partial_{x}u$$ I go for a ...
2
votes
1answer
34 views

Finite differences to ODE in polar coordinates

I have an equation of finite differences as follows: $$\frac{X_1(r+\epsilon)-X_1(r)}{ \frac{\epsilon~\beta}{2~r+\epsilon} } + \frac{X_1(r-\epsilon)-X_1(r)}{ \frac{\epsilon~\beta}{2~r-\epsilon} } = ...
1
vote
0answers
30 views

Stability conditions

Below is a problem about stability conditions that I have been struggling with it during an exam: Find the stability conditions for $$A\left ( \frac{\partial^2 u(x,\, y,\,t)}{\partial x^2} + ...
1
vote
0answers
68 views

Calculate a 5x5 Vandermonde system for a 5 point mesh

This is problem 1.2 in Randall J Leveque's textbook, "Finite Di fference Methods for Ordinary and Partial Di fferential Equations". I'm struggling with how to actually do the computation, I'm not so ...
0
votes
0answers
29 views

Questions on Difference operators

Please I really need help on the following short problems on difference operators that I need even some clues on how to go by them: 1) $\sum_{t=1}^{4}{\dfrac{1}{(t+1)(t+2)(t+3)}}= ...
2
votes
2answers
173 views

Derive forward Euler method for two-variable function

I need to derive the forward Euler method for solving ODEs and I would like some comments on what I have so far; overdot denote the time derivative: $\dot x \overset{def}{=} dx/dt$. Say we have ...
1
vote
1answer
182 views

Finite difference for variable conductivity

I'm trying to discretize a portion of the heat equation for a sphere and for a cylinder where: $r$ = radius, $T$ = temperature, and $k$ = thermal conductivity. for the cylinder shape: ...
1
vote
0answers
62 views
1
vote
1answer
143 views

A finite difference method for robust convergence despite large time steps in first order ODE

Suppose we're looking at a first order ODE of the form $$ \frac{dx}{dt}=-\lambda x+ b u $$ where $\lambda$ and b are functions of $x$ and $u$ is an 'energy generating' term which is a function of $x$ ...
0
votes
1answer
426 views

linear shooting method and finite differences

how can we use the linear shooting method to approximate this solution below: $$y'' + 4y = \cos(x), 0 \le x \le4, y(0) = 0, y(pi/4) = 0, h = \frac{\pi}{20}$$ My concern is with the RK-4 and setting ...
1
vote
0answers
239 views

Solving ODE numerically with central difference quotient

I try to understand an old Fortran code that is not well documented. In this code the ODE $$ \frac{dy}{dx} = -\frac{B(x - y)}{y} $$ is solved numerically as an initial value problem from $x_0=0.99$, ...
1
vote
1answer
61 views

Determine the numerical method

Please, help to understand the method which is used in the following snippet: ...
3
votes
1answer
292 views

Why some differential equation can be solved while similar difference equations cannot?

Take an equation $$w'+w-w^2-1=0$$ Its solution is $$w(x)=\frac{\sqrt{3}}{2} \tan \left( \frac{\sqrt{3}}2 C+\frac{\sqrt{3}}2 x\right)+\frac12$$ I wonder why a similar difference equation ...
1
vote
1answer
304 views

Derivation of finite difference schemes for a boundary value problem.

I have had no experience with differential equations before I was presented with this problem on a homework. The equation is: $ -u'' + \beta u' = 0 $ $ u(0) = 0 $ $ u(1) = 1 $ I have found the ...
3
votes
2answers
176 views

Finite differences of function composition

I'm trying to express the following in finite differences: $$\frac{d}{dx}\left[ A(x)\frac{d\, u(x)}{dx} \right].$$ Let $h$ be the step size and $x_{i-1} = x_i - h$ and $x_{i+ 1} = x_i + h$ If I ...