# Is there a way to solve this function?

• Beer-monster
In summary, a student is having trouble solving for a particular value of x and is looking for help. The student found a way to solve for x using the Lambert W function and the square root function.

## Homework Statement

It could be the late night, but a problem I've been doing results in a function of the form

$$x^{2}exp\left(\frac{-x}{a}\right) = b$$

Where a and b are constants. I'm not sure how to go about solving for x.

## The Attempt at a Solution

I've trying taking natural logarithms of both sides but that doesn't seem to help me too much.

Any help would be appreciated. I get the funny feeling I've seen this before.

You require the Lambert W function, defined as the inverse of the function x e^x. That is, if W(x) is the Lambert W function...

$$W(x) e^{W(x)} = x$$

I looked up the Lambert W function, but not quite sure how to apply it in my circumstances. Most of the stuff I find online on the topic seems a little opaque to me

I did try another method which is to rearrange the equation into:

$$exp\left(\frac{-x}{a}\right) = \frac{b}{x^{2}}$$

Now, since I'm only interested in a specific value of x (x=X) corresponding to a saddle point (the above is the result of differentiating and setting to zero) I thought I could use the Taylor series of the exponential function and take the first term. So:

$$exp\left(\frac{-x}{a}\right) \approx 1-\frac{x}{a}$$

This means I can take the first term (1) and then rearrange to solve for X.

$$\frac{b}{x^{2}}=1$$

However, I realize now that this only applies for x = X = 0. So, as far as I can tell that means I'm back to:

$$exp\left(\frac{-X}{a}\right) = \frac{b}{X^{2}}$$

Is that correct? I feel like I'm missing something because I almost felt I had it.

Unfortunately, with that extra "x" in there, you cannot solve this equation with the Lambert W function, for the same reasons you cannot solve $$\displaystyle xe^x= b$$ with the logarithm function. Of course, we could define the "Beer-Monster", BM(x), to be the "inverse function to $$\displaystyle f(x)= x^2e^{x}$$ (well,for x> 0 we can- this function is not one-to-one for all x and so does not have a true "inverse").

If y= -x/a, then x= -ay so $x^2e^{-x/a}= a^2y^2e^{y}= b$,
$$y^2e^{y}= \frac{b}{a^2}$$
and so
$$y= BM\left(\frac{b}{a^2}\right)$$
and, finally,
$$x= -ay= -aBM\left(\frac{b}{a^2}\right)[/itex] is the negative root to the equation. HallsofIvy said: Unfortunately, with that extra "x" in there, you cannot solve this equation with the Lambert W function, for the same reasons you cannot solve $$\displaystyle xe^x= b$$ with the logarithm function. Of course, we could define the "Beer-Monster", BM(x), to be the "inverse function to $$\displaystyle f(x)= x^2e^{x}$$ (well,for x> 0 we can- this function is not one-to-one for all x and so does not have a true "inverse"). If y= -x/a, then x= -ay so $x^2e^{-x/a}= a^2y^2e^{y}= b$, [tex]y^2e^{y}= \frac{b}{a^2}$$
and so
$$y= BM\left(\frac{b}{a^2}\right)$$
and, finally,
[tex]x= -ay= -aBM\left(\frac{b}{a^2}\right)[/itex]
is the negative root to the equation.

I must humbly beg to differ. As you can see, Wolfram-Alpha gives a solution for x that involves only the Lambert W function and the square root function.

## 1. Can every function be solved?

Yes, every function can be solved. However, the method of solving may vary depending on the type of function and the tools available. Some functions may have closed-form solutions, while others may require numerical methods or approximations.

## 2. What does it mean to solve a function?

Solving a function means finding the values of the independent variable(s) that make the equation or expression true. In other words, it is finding the input(s) that result in a specific output.

## 3. Is there a universal method for solving functions?

No, there is not a single method that can be used to solve all functions. The approach to solving a function depends on the specific function and the tools and techniques available.

## 4. How do I know if my solution is correct?

To verify the solution to a function, you can substitute the value(s) found for the independent variable(s) into the original function and see if it results in the given output. Additionally, you can check your solution using algebraic or numerical methods.

## 5. Can a function have multiple solutions?

Yes, a function can have multiple solutions. Depending on the type of function, there may be one or more solutions that satisfy the equation or expression. It is important to check your solutions to ensure they are all valid.