How to scale a equation e.g. by log

95 Views Asked by At

I'm currently trying to scale an equation since the numbers I have to calculate with are pretty large and Matlab outputs Infinity (Inf). However, the question here is more about the mathematics behind a reasonable scaling and not Matlab coding.

The problem in detail is that I have an equation of the form:

$$x \, \exp(1600) + 20^{50} = 0$$

I would like to solve the equation for $x$. As mentioned, in order to be able to solve the equation with matlab I have to scale it. Especially the intermediate value $\exp(1600)$ is for Matlab too large. A solution could be

$$x \, \exp(1600-\mathrm{SCLE}) + (20^{50})/\exp(\mathrm{SCLE}) = 0$$

where $\mathrm{SCLE}$ is a scaling number. However, in order to prevent exp(1600-scle) to become Inf (Matlab output) scle must be a number greater than $800$ which then results in $\exp(\mathrm{SCLE})$ becoming Inf (matlab output).

So I thought of logarithmic scaling. But I cant simply scale the whole equation like

$$\log(x \, \exp(1600) + 20^{50}) = 0$$

since this also leads to the intermediate value $\exp(1600)$ still resulting in Inf (matlab output).

So I somehow need a more sophisticated scaling solution which focuses on the intermediate value of exp(...).

I'm thankful for any idea.

Edit: Since this is only an example I'm looking for a more general solution. The equation I'm using in Matlab is much more complex where the exponent can be any large number.

1

There are 1 best solutions below

4
On

Hint: Write $20^{50}=e^{50\ln 20}$