- #1
matematikawan
- 338
- 0
I'm working on discretizing pde with boundary and initial conditions. The assumption of the method is that functions must be at least twice differentiable. I have an intial condition given by the following function
[tex]u(x,0)=f(x)=\left\{\begin{array}{cc}x,&\mbox{ } 0 \leq x <1\\2-x, & \mbox{ } 1 \leq x <2 \end{array}\right.[/tex]
I can calculate the first derivative as
[tex]f'(x)=\left\{\begin{array}{cc}1,&\mbox{ } 0 \leq x <1\\-1, & \mbox{ } 1 \leq x <2 \end{array}\right.[/tex]
Nevermind that the derivative at x=1 is not correct. We use discrete variable.
What about the second derivative. Is it equal to [tex]\delta (x-1) [/tex] or zero? How do we discretize a delta function?
[tex]u(x,0)=f(x)=\left\{\begin{array}{cc}x,&\mbox{ } 0 \leq x <1\\2-x, & \mbox{ } 1 \leq x <2 \end{array}\right.[/tex]
I can calculate the first derivative as
[tex]f'(x)=\left\{\begin{array}{cc}1,&\mbox{ } 0 \leq x <1\\-1, & \mbox{ } 1 \leq x <2 \end{array}\right.[/tex]
Nevermind that the derivative at x=1 is not correct. We use discrete variable.
What about the second derivative. Is it equal to [tex]\delta (x-1) [/tex] or zero? How do we discretize a delta function?