My goal is to solve $(\alpha - \dfrac{1}{\alpha}) - (\beta- \dfrac{1}{\beta}) = \dfrac 1 n$ where $\alpha$ and $\beta$ are rational and $n$ is a positive integer. Towards finding a particular solution, we will let $\beta = \dfrac{u}{v \alpha}$ where $u > v$ are positive integers.
myExpression[α_, β_] := (α - 1/α) - (β - 1/β)
myBase[u_, v_] := If[EvenQ[u] || EvenQ[v], (u v)/2, u v]
myQuad[u_, v_] := α /.
Solve[myExpression[α, u/(v α)] == 1/(myBase[u, v] k), α][[2]]
test = myQuad[3,2]
$\frac{1 + \sqrt{1 + 150 k^2}}{10 k}$
For $u = 3$ and $v = 2$ I get the expression shown above. What I need is to extract the 150 from the expression.
k^2is150. As @Kuba noted, we need to understand just what are trying to accomplish in order to be of help. – bbgodfrey May 05 '15 at 16:35TreeForm– LLlAMnYP May 05 '15 at 18:17(1 + Sqrt[1 - 150 k^2])/(m k) /. {(1 + Sqrt[1 + n_ k^2])/(m_ k) -> n}– LLlAMnYP May 05 '15 at 18:24a b (a+b)^2times 4 if both odd. – george2079 May 06 '15 at 04:00