I need to solve an integral equation, the integral is:

For example, I need the value of theta if the result of the integral is 0.6. How can I implement this in STAN ?

I need to solve an integral equation, the integral is:

For example, I need the value of theta if the result of the integral is 0.6. How can I implement this in STAN ?

@wds15 is correct. Stanâ€™s algebraic solver should be able to handle this. You need to specify an algebraic equation of the form

f(\theta) = 0

So if I understand you correctly,

f(\theta) = 1 + 4 \frac{\frac{1}{\theta} \int_0^\theta \frac{x}{e^x - 1} dx}{\theta} - 0.6.

The ODE solver should be able to handle the integral in the nominator, with the integrand providing the R.H.S of the differential equation â€“ youâ€™ll need to work out the initial condition, which should be feasible with a tool like wolfram mathematica. Alternatively, if \theta is a scalar, you might try the 1D integrator.

1 Like