# Solve for X in the given Equation(Gamma Curve)

I'm having a set of points in the form:

${(\frac A{255})}^{\frac 1x}=\frac B{255}$

I need to Find $x$ in the Equation.Where $A$ & $B$ are set of constants ranging from $0$ to $255$. Please provide me some methods to solve this equation with explanation. Assume I'm having very little knowledge in this math involved.

• What about taking logarithms of both sides ? This should be the first step. – Claude Leibovici Apr 9 '15 at 12:21
• Can you please elaborate it? – Balaji R Apr 9 '15 at 12:26

If I got right what are you asking I would take the log on both sides which leads me to:

$\frac 1x=\log_{\frac A{255}}(\frac B{255})$

And then (taking reciprocals and using logs properties):

$x=\log_{\frac B{255}}(\frac A{255})$

If you need to computate this with a high degree of accuracy you can first say that:

1) $A$ and $B$ must be different from $0$ for the existence of the log;

2) $B$ must be different from $255$ for the existence of the log's base;

3) If the base exists and $A=255$ then $x$ would be $0$ but it can't be for the existence of the exponent.

Now you can convert the log in base $10$ or base $e$ (natural log) to make calculus faster for your calculator.

• Why not to use $\log_e$ or $\log_{10}$ ? – Claude Leibovici Apr 9 '15 at 12:38
• Using the base $\frac A{255}$ I can get straight to the result whitout changing base. – Renato Faraone Apr 9 '15 at 12:39
• You are perfectly correct from a mathematical point of view. But how would you compute $x$ for given $A,B$ ? – Claude Leibovici Apr 9 '15 at 12:48
• So for log 10 ,Result will be x = log (A/255) / log (B/255). is this right? – Balaji R Apr 9 '15 at 13:14
• Edited with the hope now things are more precise ;) – Renato Faraone Apr 9 '15 at 14:51