I have made some simple linear interpolation functions:
nM = 7;
xi = Table[2 (j - 1)/(nM - 1), {j, nM}];\[CurlyPhi][1] =
Interpolation[{{xi[[1]], 1}, {xi[[2]], 0}, {xi[[nM]], 0}},
InterpolationOrder -> 1]; \[CurlyPhi][2] =
Interpolation[{{xi[[1]], 0}, {xi[[2]], 1}, {xi[[3]], 0}, {xi[[nM]],
0}}, InterpolationOrder -> 1];
\[CurlyPhi][nM - 1] =
Interpolation[{{xi[[1]], 0}, {xi[[nM - 2]], 0}, {xi[[nM - 1]],
1}, {xi[[nM]], 0}}, InterpolationOrder -> 1];
\[CurlyPhi][nM] =
Interpolation[{{xi[[1]], 0}, {xi[[nM - 1]], 0}, {xi[[nM]], 1}},
InterpolationOrder -> 1];
Do[\[CurlyPhi][j] =
Interpolation[{{xi[[1]], 0}, {xi[[j - 1]], 0}, {xi[[j]],
1}, {xi[[j + 1]], 0}, {xi[[nM]], 0}},
InterpolationOrder -> 1], {j, 3, nM - 2}];
The Integrate[ ] function can do a definite integral without a problem. For example
\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(2\)]\(\(\[CurlyPhi][
1]'\)[x] \[DifferentialD]x\)\)
gives the exact answer -1. However the definite integral of the product of two such functions returns unevaluated, even though the piecewise polynomial ought to be integrable. For example
\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(2\)]\(\(\[CurlyPhi][
1]'\)[x] \(\[CurlyPhi][4]'\)[x] \[DifferentialD]x\)\)
returns
\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(2\)]\(\(\*
TagBox[
RowBox[{"InterpolatingFunction", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{"0", ",", "2"}], "}"}], "}"}], ",", "\<\"<>\"\>"}], "]"}],
False,
Editable->False][x]\ \*
TagBox[
RowBox[{"InterpolatingFunction", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{"0", ",", "2"}], "}"}], "}"}], ",", "\<\"<>\"\>"}], "]"}],
False,
Editable->False][x]\) \[DifferentialD]x\)\)
What went wrong here?
Thanks in advance for helping!