New answers tagged

0

You seem to be discussing the implicit midpoint method, $$ U^{j+1}=U^j+ΔtF\left(\tfrac12(U^{j+1}+U^j)\right). $$ Which could also be implemented as a backwards Euler step of half the step size $$ U^*=U^j+\frac{Δt}2F(U^*) $$ followed by a forward Euler step $$ U^{j+1}=U^*+\frac{Δt}2F(U^*). $$ Yes, that is a second order method (in time), the same as the ...


1

Since you're using a finite difference method, you're turning the the PDE into a set of algebraic equations, I'm sure you know this. It seems to me that you won't ever get a solution because you are just adding an equation (expanding the dimensions of the matrix $A$ in the equation $Ax = b$). So your issue is that you don't have the first or last entries of ...


0

I always recommend Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-dependent Problems by Randall LeVeque. It is a very accessible text and gives overviews and enough examples of Finite Difference Methods for you to get the hang of the method as well as covering consistency, convergence and stability questions.


2

I will only show the derivation for $$\frac{\partial V_{N - 1}}{\partial S} \approx \frac{-3V_N - 10V_{N - 1} + 18V_{N - 2} - 6V_{N - 3} + V_{N - 4}}{12h}$$ since a similar procedure can be used to derive all of these formulas. I will assume the grid is evenly spaced, since that seems to give the results he obtained. WLOG, assume the $V_{N - 1}$ point is at $...


0

Apparently you want to use $x=5$. For $f(x)=x^3$, we have $f(5)=125$, $f‘(5)=75$, $f‘‘(5)=30$, $f‘‘‘(5)=6$, which does lead to $216$.


Top 50 recent answers are included