Numerically solve integral with a function as variable of integration

76 Views Asked by At

I want to use a function as variable of integration for example in evaluating the integral:

$\int_0^1 e^{\cos x}f(\sin x)d\cos x$

in which $f(x)$ is an arbitrary function.

1

There are 1 best solutions below

0
On BEST ANSWER

To formalise the comments, you can take $y=\cos x$ so $d\cos x=dy$ and $\sin x = \sqrt{1-\cos^2x}=\sqrt{1-y^2}$ therefore your integral is $$\int_0^1 e^yf\left(\sqrt{1-y^2}\right)dy$$