Discretization of $(1-0.8\sin^2 x)y_{xx}-0.8\sin(2x)y_x-\lambda y = 0$

31 Views Asked by At

Given the equation,

$(1-0.8\sin^2 x)y_{xx}-0.8\sin(2x)y_x-\lambda y = 0$,

I wonder if the term $(1-0.8\sin^2 x)y_{xx}$ can be discretized as

$\dfrac{p_{n-1} y_{n-1} - 2p_n y_n + p_{n+1} y_{n+1}}{\Delta x^2}$

where $p_n = 1 - 0.8\sin^2\left(\frac{n\pi}{N+1}\right) $?

I understand that the second derivative, i.e $y_{xx}$, is discretized as

$\dfrac{y_{n-1}-2y_n+y_{n+1}}{\Delta x^2}$

but I am quite unsure of how the factor $(1-0.8\sin^2 x)$ will affect the given recursion?

Any help appreciated!

1

There are 1 best solutions below

0
On

No, that would give you an approximation of the second derivative of $p(x)y(x)$. You could combine the first two terms to $$(p(x)y'(x))'=p(x)y''(x)+p'(x)y'(x),$$ noting that with $p(x)=1-0.8\sin^2x$ we have $p'(x)=-0.8\cdot 2\sin x\cos x=-0.8\sin(2x)$. This then can be discretized using a central quotient twice as $$ \frac{p_{n+1/2}\frac{y_{n+1}-y_n}{Δx}-p_{n-1/2}\frac{y_n-y_{n-1}}{Δx}}{Δx} = \frac{p_{n-1/2}y_{n-1}-(p_{n+1/2}+p_{n-1/2})y_n+p_{n+1/2}y_{n+1}}{Δx^2} $$