# Tagged Questions

26 views

### Finite Difference - Forward Difference with 2nd order Accuracy: What to do at the boundary?

I implemented a BVP using a first-order finite difference scheme after the shooting method did not work reliably. Its the first time I have worked with this. The code works but I would like to move to ...
33 views

### How to discretize mixed partial derivatives?

How to discretize $\frac{\partial^3 f}{\partial x\partial y^2}$ at mesh point $(i,j)$? We should use mesh points which are nearest to $(i,j)$.
46 views

### Checking if the Hessian is the derivative of the gradient

Suppose $f: \Bbb R^n \to \Bbb R$. I have a code that computes the gradient of $f$. I have another code that computes the Hessian of $f$ times a vector. Now I want to check if they are correct. ...
33 views

### Finite Difference Method Stability with diffusion equation

The diffusion equation is: $\frac{\partial T}{\partial t} = \alpha \left( \frac{\partial^2 T}{\partial x^2} \right)$ An explicit finite difference approach can be used to solve this, forward in ...
103 views

### Finite Difference Spacing of Points for PDE's for Convergence of Explicit Forward-Stepping Scheme

I realize that this question could be pretty broad, but I'm wondering at least what the conditions are for my simulation. I'm developing an Explicit Forward-Stepping Finite Difference scheme to solve ...
40 views

### Avoiding substraction for finite difference with log and exp

I want to approximate the derivative of f(x) Finite difference $f'(x) \approx \frac{f(x+h)-f(x)}{h}$ I was taught that the error from the substraction is blown up for small h. This I can verify ...
26 views

### heat equation with Interface Crank Nicolson

I am currently working on solving the heat equation with an interface numerically using Crank-Nicolson. There are jump discontinuities at the interface which are dealt with using fictitious values ...
32 views

174 views

### Is there a mean value theorem for higher order differences?

The standard mean value theorem tells us $\frac{f(x+h)-f(x)}{h} = f'(c)$ for some $c$ between $x$ and $x+h$. Rewriting this, we may see it as $\frac 1h\Delta_h f(x) = f'(c)$. This makes me wonder if ...
55 views

### Numerical solution of a difference equation

I would like to solve in $f$ the equation $f(x) - f(x-d) = g(x),$ where $g$ is a given function and $d$ a given constant delay. We can assume $f(x) = 0$ for negative $x$. When $g$ is sampled (with a ...
195 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: ...
134 views

### Related to Applying Runge-Kutta Method

I have an initial value problem (henceforth IVP) as follows: $$\frac{d \Phi(t)}{dt}= A(t)\Phi(t)$$ subject to the initial condition $\Phi(t_0)=I$, where $\Phi(t), A(t), I$ are square matrices of same ...
180 views

### Stability of the BTCS scheme for the heat equation in a disk

Consider the $1$-D heat equation: $$u_t = a \Delta u = au_{xx} \\ u(0,t) = u(1,t) = 0 \\ u(x,0) = u_0(x)$$ where $a > 0$ is constant and $u_0$ is given. It is a classic result that the implicit ...
127 views

142 views

### finite differences for PDE's

I am having trouble with this question, much appreciated if anyone can help? a) for the 2nd order wave equation: \begin{align} &\partial_{tt}u(x,t)-c^2\partial_{xx}u(x,t)=0 & (x,t) \in ...
437 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 ...
68 views

114 views

### Orthogonal vs general curvilinear coordinates

Solutions to PDEs over irregular domains can be computed using the finite difference method by the introduction of so called body fitted coordinate systems where the coordinate lines are aligned to ...
62 views

### Determine the numerical method

Please, help to understand the method which is used in the following snippet: ...
Suppose I have two points $x_1,x_2$ between which I would like to have a linear interpolation $P_1$. I know the value of the function $f$ at $x_1,x_2$. The error at any point between the two will be ...