p^2 + 2pq + q^2 = 1
where p^2 represents the frequency of homozygous dominant individuals (LL), q^2 represents the frequency of homozygous recessive individuals (qq), and 2pq represents the frequency of heterozygous individuals (Lq).
We are given that the frequency of homozygous recessive individuals (qq) is 0.12. Therefore, q^2 = 0.12 and q = sqrt(0.12) = 0.346.
We can then use the Hardy-Weinberg equation to solve for p:
p^2 + 2pq + q^2 = 1
p^2 + 2(p)(0.346) + (0.346)^2 = 1
p^2 + 0.692p + 0.12 = 1
p^2 + 0.692p - 0.88 = 0
We can solve this quadratic equation using the quadratic formula:
p = (-b +- sqrt(b^2 - 4ac)) / 2a
where a = 1, b = 0.692, and c = -0.88.
p = (-0.692 +- sqrt(0.692^2 - 4(1)(-0.88))) / 2(1)
p = (-0.692 +- sqrt(0.4796 + 3.52)) / 2
p = (-0.692 +- sqrt(3.9996)) / 2
p = (-0.692 +- 1.9999) / 2
There are two possible solutions for p:
p1 = (-0.692 + 1.9999) / 2 = 0.6539
p2 = (-0.692 - 1.9999) / 2 = -1.346
Since p must be a frequency, it must be between 0 and 1. Therefore, the only valid solution is p1 = 0.6539.
Therefore, the frequency of the dominant allele (long legs) is 0.6539.