1

Assume I try to work in 1D, and solve an equation which contains expressions of the form: $u''$, but also an expression of the form : $(u v' ) ' $. Assume I discretize my region of solution, and denote $h$ to be my spacing.

  1. I am trying to work with central differences and write: $$ u'' \approx \frac{u_{i+1}-2u_i + u_{i-1 } }{h^2} $$ what is the correct way to write the expression: $(u v' ) ' $ in a difference form ? (without "opening the brackets")

  2. Is there any way to find a matrix $D$ for which $D (uv) \approx (uv')' $ ?

Will you please help me?

Thanks

georgia
  • 119

1 Answers1

1

To discretize $(uv')'$, you can just follow the straightforward ansatz, start with forward differences for $v'$ $$ v_i' \approx \frac{v_{i+1} - v_i}h $$ multiply by $u$ $$ (uv')_i \approx \frac{u_iv_{i+1} - u_iv_i}h $$ and now backward differencing for the other derivative, giving $$ (uv')'_i \approx \frac{(uv')_i - (uv')_{i-1}}h \approx \frac{u_iv_{i+1} - u_iv_i - u_{i-1}v_i + u_{i-1}v_{i-1}}{h^2} $$ I do not quite grasp want you want for $D$.

martini
  • 84,101
  • Thanks. Great answer. The only question I still have left is-will it be wrong to use central differencing for both the "inner" derivative (the one for v) and for the outer derivative? (the ony for uv') – georgia Nov 11 '15 at 18:32