I have the equation : $$ -40 = \int_{-50}^{-20}\frac{10^4}{10^4+q\left(10^3-(10+h)^3\right)}\,dh $$
How do I determine the value of $q$ to satisfy the above equation?
The only idea I have is some sort of newton method but with the integral, and also if anyone has a document explaining the topic it would be great, thanks.
Let us start considering the integrand$$\frac{10^4}{10^4+q\left(10^3-(10+h)^3\right)}$$ Now, let $$10+h=x\,\sqrt[3]{\frac{10^4}{q}+10^3}\implies h=10 \left(\sqrt[3]{\frac{q+10}{q}} x-1\right) \implies dh= dx\,10 \sqrt[3]{\frac{q+10}{q}}$$ All of that makes the indefiniite integral to be $$I=-\frac{100}{q \left(\frac{q+10}{q}\right)^{2/3} }\int\frac {dx}{x^3-1}$$ Now, since (as usual) $x^3-1=(x-1)(x^2+x+1)$, partial fraction decomposition followed by integration leads to $$\int\frac {dx}{x^3-1}=-\frac{1}{6} \log \left(x^2+x+1\right)+\frac{1}{3} \log (1-x)-\frac{\tan ^{-1}\left(\frac{2 x+1}{\sqrt{3}}\right)}{\sqrt{3}}$$ where $x=\frac{h+10}{10 \sqrt[3]{\frac{q+10}{q}}}$; so, for $x$, the integration has to be made between $-\frac{4}{\sqrt[3]{\frac{q+10}{q}}}$ and $-\frac{1}{\sqrt[3]{\frac{q+10}{q}}}$.
This gives the equation to be solved and, as you said, Newton method would be the simplest even if the function is quite ugly. The result is the number you provided in a comment.