I’d like to solve the below equation for the unknown $T$:
$$\int_0^\infty \frac{x^2}{\exp\left(\frac{x}{T}\right)-1}\kappa_x \mathrm{d}x = C,$$
where $C$ is a known constant and $\kappa_x$ is some function of $x$, although the actual function is unknown – all I have as an array of values of $\kappa$ over different values of $x$.
I do not want to have to fit this it to a function first. I was hoping to use one of the SciPy’s numerical integration functions such as integrate.simps
.
I’m confused on how to solve this; since $T$ is inside an exponential with $x$ dependence I cannot simply pull it out of the integral. It would be great to be able to pass the unknown constant into my numerical integral and receive an answer in terms of the constant. But as far as I know, in Python, I cannot pass an unknown. How can I accomplish this?
Edit: Here is an example of what my $\kappa_x$ array could look like:
k_arr = [1.1e-3, 8.8e-2, ..., 3.7e3]
(i.e., floating point numbers generally ranging from ~ 10^-3 to 10^3. But the length of my real array is about 3000).
To provide some more explanation, the reason I subscript it as $\kappa_x$ is because each of the values is associated with some $x$ value (in my case, $x$ is an energy or frequency). Previously I used various energies to arrive at $\kappa$ values, which are opacities in units of cm^2 g^-1. The integral in question relates to the power per unit mass emitted by dust in a galaxy, where I omitted constants (except for the temperature $T$). It is equal to some known number, so that I can hopefully solve for the temperature of the dust.