I would like to numerically solve a Fredholm Equation where the unknown function is composite. For example, an equation like the one described in Solving Fredholm Equation of the second kind but having composite functions as unknowns.
Consider then the Fredholm Equation: $$\phi\left(\frac{x^2}{2}-1\right) = 1 + \frac12 \int_{0}^{\pi} \text{cos}\left(x-s\right) \, \phi\left(\frac{s^2}{2}-1\right) \,ds$$ for $x\in[0,\pi]$.
How could one use Mathematica to find a numerical solution?
restart; evalf(intsolve(phi(t) = 1 + 1/2*int(cos(sqrt(2 + 2*t) - s)*phi(s)/sqrt(2 + 2*s), s = -1 .. Pi^2/2 - 1), phi(t), method = collocation, order = 2));
produces $\phi(t)= 0.1998091304 t^{2}- 0.9895444856 t+ 0.8053645268$. The plotplot(eval(0.1998091304*t^2 - 0.9895444856*t + 0.8053645268, t = x^2/2 - 1), x = 0 .. Pi)
is strikingly different from the one in the below answer. $\endgroup$restart; evalf(intsolve(phi(t) = 1 + 1/2*int(cos(sqrt(2 + 2*t) - sqrt(2 + 2*s))*phi(s)/sqrt(2 + 2*s), s = -1 .. Pi^2/2 - 1), phi(t), method = collocation, order = 2));
produces $\phi(t)=- 0.4666943120 t^{2}+ 2.240582170 t+ 1.558351011$. The plotplot(eval(-0.4666943120*t^2 + 2.240582170*t + 1.558351011, t = x^2/2 - 1), x = 0 .. Pi)
is dramatically different from the below plot. $\endgroup$restart; evalf(intsolve(phi(t) = 1 + 1/2*int(cos(sqrt(2 + 2*t) - sqrt(2 + 2*s))*phi(s)/sqrt(2 + 2*s), s = -1 .. Pi^2/2 - 1), phi(t), method = collocation, order = 3));
produces $\phi(t)= 0.1526021469 t^{3}- 1.249904734 t^{2}+ 2.400982898 t+ 3.155295017$. One may look at its plot inx
byPlot[0.1526021469*t^3 - 1.249904734*t^2 + 2.400982898*t + 3.155295017 /. t -> x^2/2 - 1, {x, 0, Pi}, PlotPoints -> 30]
. $\endgroup$