# Thread: solve equation with factorials

1. ## solve equation with factorials

Hi. The question is:Given that the product of all postive odd number smaller that the number 2x is 945.Find x.I know that I can use the equation(2x!)/(2^x)(x!)=945.Using stirling approximation and using logarithm ,i get x=-2.825/(0.4343-log 2x) which i am told that is not solvable by algebraic methods. So is there any way to solve the equation using algebraic method?I know that the answer is 5 i hope not to use inspection to find it, instead i hope to solve the above equation. Thanks.

2. ## Re: solve equation with factorials

That equation can not be solved by what we would normally call "algebraic methods". You can write it as 0.4343x- x log(2x)= -2.825 so that x log(2x)= 2.825- 0.4343x and then log(2x)= 2.825/x- 0.4343. Taking the exponential of both sides, 2x= e^{2.825/x- 0.4343}= e^{-0.4343}e^{2.825/x}. Let y= 2.825/x so x= 2.825/y and 2x= 5.650/y. The equation becomes 5.660/y= e^{-0.4343}e^y. Multiply both sides by ye^{0.4343} to get 5.66e^{0.4343}= ye^y.

Now apply the "Lambert W function" to both sides to get y= W(5.66e^{0.4343}). Finally, since x= 2.825/y, x= 2.825/W(5.66e^{0.4343}).

The "Lambert W function", https://en.wikipedia.org/wiki/Lambert_W_function, is defined as the inverse function to f(x)= xe^x.

3. ## Re: solve equation with factorials

Originally Posted by HallsofIvy
That equation can not be solved by what we would normally call "algebraic methods". You can write it as 0.4343x- x log(2x)= -2.825 so that x log(2x)= 2.825- 0.4343x and then log(2x)= 2.825/x- 0.4343. Taking the exponential of both sides, 2x= e^{2.825/x- 0.4343}= e^{-0.4343}e^{2.825/x}. Let y= 2.825/x so x= 2.825/y and 2x= 5.650/y. The equation becomes 5.660/y= e^{-0.4343}e^y. Multiply both sides by ye^{0.4343} to get 5.66e^{0.4343}= ye^y. Now apply the "Lambert W function" to both sides to get y= W(5.66e^{0.4343}). Finally, since x= 2.825/y, x= 2.825/W(5.66e^{0.4343}). The "Lambert W function", https://en.wikipedia.org/wiki/Lambert_W_function, is defined as the inverse function to f(x)= xe^x.
Did your e means natural logarithm or log 10?as I mean log 10 in this problem.or it is easier to solve the equation sqrt 2(2x/e)^x=945?and is there any approximation for Lambert w function?

4. ## Re: solve equation with factorials

$1\cdot 3 \cdots 5\cdot 7\cdot 9 = 945$ so $x=5$. Why not solve by inspection? You say you don't want to, but it is by far the easier approach.

5. ## Re: solve equation with factorials

Originally Posted by SlipEternal
$1\cdot 3 \cdots 5\cdot 7\cdot 9 = 945$ so $x=5$. Why not solve by inspection? You say you don't want to, but it is by far the easier approach.
Actually I post this to find help on solving equation (2x!)/(2^x)(x!)=945 or x=-2.825/(0.4343-log 2x).I already find the answer 5 by inspection. But when I try to solve it using equations I am stucked,so I came here for help. I hope I can learn way to solve equation like this in here. Thanks.

6. ## Re: solve equation with factorials

Originally Posted by lai001
Did your e means natural logarithm or log 10?as I mean log 10 in this problem.or it is easier to solve the equation sqrt 2(2x/e)^x=945?and is there any approximation for Lambert w function?
Yes, I assumed the logarithm was to base e. If your logarithm is base 10 then use the fact that if $\displaystyle y= log_{10}(x)$ then $\displaystyle x= 10^y= e^{ln(10^y)}= e^{yln(10)}$ so that $\displaystyle ln(x)= y ln(10)= log_{10}(x) ln(10)$ so that $\displaystyle log_{10}(x)= \frac{ln(x)}{ln(10)}$.

An approximation for the Lambert W function is given on the webpage I linked to:
$\displaystyle x- x^2+ \frac{3}{2}x^3- \frac{8}{3}x^4+ \frac{125}{24}x^5$.

7. ## Re: solve equation with factorials

Do you mean that log 2x=In 2x/In 10?So after multiply the right side of the equation with In 10,I can take the exponential of both side and do using your way?

8. ## Re: solve equation with factorials

Use the double factorial function:
9!! = 945

Similarly with evens:
8!! = 384

9. ## Re: solve equation with factorials

NOT "In", "ln"! The standard notation for "natural logarithm" is "small L, small N", not "capital I, small N".

10. ## Re: solve equation with factorials

Originally Posted by HallsofIvy
NOT "In", "ln"! The standard notation for "natural logarithm" is "small L, small N", not "capital I, small N".
Sorry for typing errors....

11. ## Re: solve equation with factorials

Yeah, that was a bit of a rant- but I have seen that "In" for the natural logarithm so much it rankles me!

12. ## Re: solve equation with factorials

Originally Posted by HallsofIvy
Yes, I assumed the logarithm was to base e. If your logarithm is base 10 then use the fact that if $\displaystyle y= log_{10}(x)$ then $\displaystyle x= 10^y= e^{ln(10^y)}= e^{yln(10)}$ so that $\displaystyle ln(x)= y ln(10)= log_{10}(x) ln(10)$ so that $\displaystyle log_{10}(x)= \frac{ln(x)}{ln(10)}$.

An approximation for the Lambert W function is given on the webpage I linked to:
$\displaystyle x- x^2+ \frac{3}{2}x^3- \frac{8}{3}x^4+ \frac{125}{24}x^5$.
After finding Wikipedia, the approximation you give actually seems is a infinite series as it does stop at (125/24)(x^5),it still continues....

13. ## Re: solve equation with factorials

Originally Posted by lai001
After finding Wikipedia, the approximation you give actually seems is a infinite series as it does stop at (125/24)(x^5),it still continues....
The infinite series is the exact series that represents the Lambert W function. The first five terms gives an approximation. So, no, the approximation HallsofIvy gave stopped exactly where he said it stopped.

14. ## Re: solve equation with factorials

Originally Posted by SlipEternal
The infinite series is the exact series that represents the Lambert W function. The first five terms gives an approximation. So, no, the approximation HallsofIvy gave stopped exactly where he said it stopped.
Ok... Thanks for explaining.

15. ## Re: solve equation with factorials

Originally Posted by SlipEternal
The infinite series is the exact series that represents the Lambert W function. The first five terms gives an approximation. So, no, the approximation HallsofIvy gave stopped exactly where he said it stopped.
As I don't know what reason I cannot use the approximation given to find the answer after I try it，maybe I make mistake (I try many times) or my W(4.786) is positive(does it effects?)?

Finally finding the internet, I get a approximation that gives me answer that have a difference of 0.05% with my answer given by my calculator(Still I plug the answer to ye^y and get 4.7807,but still feeling relieved,and result in more nearer than my original answer, 5)....