Solving integral equation with an unknown function under the integral in matlab

153 Views Asked by At

Is it possible to solve a equations like this: $\sin(x) = (1 - \int y(x) dx) * y(x) $

whats matlab code for this equation?

1

There are 1 best solutions below

0
On BEST ANSWER

I don’t know matlab. But you asked if ‘it is possible to be solved’, and my answer to that is yes.

Let $u=\frac{\sin x}y$, $u’=\frac{du}{dx}$.

We have $$u=1-\int\frac{\sin x}{u}dx$$

Differentiating both sides,

$$u’=-\frac{\sin x}u$$ $$\begin{align} udu&=-\sin x~dx \\ C+\frac{u^2}2&=\cos x\\ u&=\pm\sqrt{C+2\cos x}\\ y&=\pm\frac{\sin x}{\sqrt{C+2\cos x}}\\ \end{align} $$