The Student Room Group

Integral over a subdivided interval

Divide [0,1] into N subintervals (xk,xk+1),k=0,...,N1(x_k,x_{k+1}), k=0,...,N-1 using xk=kh,k=0,...,N,h=1N,N2x_k=kh,k=0,...,N, h=\frac{1}{N}, N\geq 2.

Let ϕk(x)=(1xxkh)+,k=1,...,N1\phi_k(x)=\left(1-\left| \frac{x-x_k}{h}\right|\right)_{+}, k=1,...,N-1 and let p,q be constant functions over [0,1].

I'm trying to find the piecewise solution to the integral 01[pϕjϕi+qϕjϕi]\int_0^1\left[ p \phi_j' \phi_i' + q \phi_j \phi_i\right]. The solution is given in my notes without any explanation so I must be missing something because I'm not sure how to do it. Can someone help?
Reply 1
What do you mean by the '+' sign in the definition of phi_k. If it means that f(x)+=max(f(x),0)f(x)_+ = \max(f(x), 0) (which is my best guess), then for any particular i, there are not many values of j s.t. ϕiϕj0\phi_i \phi_j \neq 0 (and same for the derivatives). It's all fairly straightforward (if a little fiddly).
Reply 2
Original post by DFranklin
What do you mean by the '+' sign in the definition of phi_k. If it means that f(x)+=max(f(x),0)f(x)_+ = \max(f(x), 0) (which is my best guess),

That's correct.

then for any particular i, there are not many values of j s.t. ϕiϕj0\phi_i \phi_j \neq 0 (and same for the derivatives).

Can you explain a bit further how you know this? I've just started reading about a new topic today so I may be unfamiliar with this kind of work.
Reply 3
Original post by 0-)
That's correct.


Can you explain a bit further how you know this? I've just started reading about a new topic today so I may be unfamiliar with this kind of work.
Draw a sketch - each function is only non-zero over a small region. For the product to be non-zero the "non-zero" bits of each function will have to overlap.
Reply 4
Original post by DFranklin
Draw a sketch - each function is only non-zero over a small region. For the product to be non-zero the "non-zero" bits of each function will have to overlap.

OK I can see that the product will be non-zero only if |i-j|=1 or i=j. I'm not how to do the next part - the integration.

Could you show me how to find e.g. 01ϕiϕi+1 dx\displaystyle \int_0^1 \phi_i \phi_{i+1} \ dx. It should all click into place after that.
Reply 5
Can anyone help? I'm looking at this for the second time and I'm still struggling.
Reply 6
Well, suppose i = j. What is ϕi2\phi_i^2? There's an interval where it's (1xi/N1/N)2\left(1 - \frac{x - i / N}{1/ N}\right)^2 (which you can make a little nicer by multiplying through by N), and another interval where it's (1+xi/N1/N)2\left(1 + \frac{x - i / N}{1/ N}\right)^2.

Neither of these is terribly difficult to integrate, and then you just add.

ϕiϕi+1\phi_i \phi_{i+1} is somewhat similar (but I think there's only one interval to consider - I haven't drawn the sketch).
Reply 7
Original post by DFranklin
Well, suppose i = j. What is ϕi2\phi_i^2? There's an interval where it's (1xi/N1/N)2\left(1 - \frac{x - i / N}{1/ N}\right)^2 (which you can make a little nicer by multiplying through by N), and another interval where it's (1+xi/N1/N)2\left(1 + \frac{x - i / N}{1/ N}\right)^2.

Neither of these is terribly difficult to integrate, and then you just add.

ϕiϕi+1\phi_i \phi_{i+1} is somewhat similar (but I think there's only one interval to consider - I haven't drawn the sketch).


I have the solution to ϕiϕj\int \phi_i \phi_j for i=ji=j as 4h6\frac{4h}{6} but after putting the sum of the integrals into Maple I get 2+23N22Ni+2i22+\frac{2}{3}N^2-2Ni+2i^2. Can you see what's going wrong?
Reply 8
You've not exactly posted much of your working. But almost certainly, you've got the limits of your integrals wrong.
Reply 9
Original post by DFranklin
You've not exactly posted much of your working. But almost certainly, you've got the limits of your integrals wrong.


:facepalm: Finally I realise where I've been going wrong. Sorry it took so long!

Thank you for your help.

Quick Reply

Latest