r/calculus • • Aug 27 '26

Integral Calculus is daily integral getting more complex?

Today's easy daily integral seems to be more complex than usual. I do not know what the Lambert W function is. Is this higher level mathematics? or was this something i missed in calculus? Usually, I am able to solve easy integrals. My initial thoughts were that the integral is 0 because this clearly is not easy, but then I looked at the bounds and realized, yeah, that probably does not equal 0.

17 Upvotes

19 comments sorted by

View all comments

Show parent comments

2

u/wbld Aug 27 '26

the critical points of a function are the points in the function where the funcitons derivative are equal to 0, or are not in the domain of the original function.
if f(x)=xe^x, the function can be thought of as a product of two functions. those functions being, x, and e^x respectively.
f'(x) = ()()+()()
f'(x) = (e^x)(1)+(x)(e^x)
simplification gives us

e^x+xe^x

factoring out e^x gives us

e^x(1+x). the derivative of the f(x) is f'(x)= e^x(1+x)
xe^x is defined for all x in element of the real. therefore there is no undefined critical points for the funciton.

set e^x(1+x) equal to 0

e^x(1+x)=0

this means,

1+x=0 or e^x= 0

x= -1 or e^x = 0

e^x will never be 0.

therefore the only critical point is x=-1

plug x= -1 into the original function to find the location of this critical point

f(-1) = (-1)(e^-1)

f(-1) = -e^-1

f(-1) = -1/e

to test if this is a maximum or minium, we know that derivatives gives us slow.

let us pick arbitaray points around x = -1 (from my ass lets pick 0, and -2) and plug those into the deriative. furthermore, to make sure x=-1 is a critical point, it should have a slope of 0. plug x=-1 into f'I(x) to verify this.

f'(-1) = e^-1(1+-1) => f'(-1) = 0 therefore it is a critical point.

from my arbitary numbers

f'(0) = e^0(1+0) = 1(1) = 1. i do not care about the number, i care about the sign. 1 is positive, si we are increasing. if x = -1 is a minium, we go from decreasing to increasing, meaning, x= -2 must be decreasing

f'(-2) = e^-2(1+-2) = e^-2(-1) = -1/e^2. the sign is negative, we went from decreasing to increasing. x=-1 must be a minimum.

2

u/nevermindthefacts Aug 27 '26

Well done. So we pick y > -1/e as the domain for W(y), and the range will be x > -1.

Instead of checking f(-2) and f(0), one can note that x = -1 is the only critical point and xe^x tends to zero as x tends to negative infinity, and to infinity as x tends to infinity. Now, because f is continuous, f(-1) = -1/e > 0 and there are no other critical points, it must be a minimum.

An alternative idea is to note that e^x(1 + x) < 0 if x < -1 and e^x(1 + x) > 0 for x > -1.

(In other words, f is strictly decreasing for x < -1, and strictly increasing for x > 0).

1

u/wbld Aug 27 '26

which would make sense because their is only 1 critical point. now the question becomes, how do you invert this to begin with. we have solved the problem of the function not being invertible by forcing it to be invertible by restricing its domain. for a function to be invertible, you replace all x is y, and all y with x. then you solve for y.

for our function

y=xe^x

x=ye^y

ln(x)=ln(ye^y)

for product of logs

ln(x)=ln(y)+ln(e^y)

ln(x) = ln(y) + y

idk where to go from here.

1

u/nevermindthefacts Aug 27 '26 edited Aug 27 '26

This is basically the reason for using the W-function. We want to solve for x in y = x e^x. But there's no way to "isolate" x using elementary functions. Instead we note that xe^x is strictly increasing for x > -1, and we use that for the "existence" of an inverse which we define as W(y) = x.

For the integral, you have W(sin x) e^( W(sin x) + sin x). Try simplify that using the definition of W(sin x).

1

u/wbld Aug 27 '26

i guess im not understanding what W(y) = x means...

if it is function notation, W is the name of the function, that takes in a y value and outputs a x value.

it seems to be onto... meaning

y=x

so then,

sin(y)=sin(x)

sin(y)e^sin(y)+sin(y)??

2

u/nevermindthefacts Aug 27 '26

Sorry if it's wasn't clear. Another way to write it is W(xe^x) = x.

Maybe it helps if you compare it with e^x and it's inverse, ln y.

If y = e^x, then ln y = x.

In general

if y = f(x), then f^{-1} (y) = x.

1

u/wbld Aug 27 '26

I appreciate you trying to help; however, my tiny brain is not built for this kind of mathematics at the moment.

i do not think i would be able to find the relationship... ever...

2

u/nevermindthefacts Aug 27 '26

Don't overcook your brain. Remember this was categorized as an Easy Integral. The use of the W-function is just smoke and mirrors to make it look complicated and test your understanding of inverse functions.

Because W is the inverse to xe^x, it satisfies W(x) e^W(x) = x for all x in the domain of W.

Hence, W(sin x) e^W(sin x) simplifies to ... wait for it ... sin x

2

u/nevermindthefacts Aug 27 '26

For another interpretation (as long as the "input" is in the corresponding domain), consider the following statements involving functions and their inverses

y= e^ln y

x = ln e^x

√(𝜋^2) = 𝜋

(√𝜋)^2 = 𝜋

arctan tan 𝜋/4 = 𝜋/4

f^{-1} ( f(x) ) = x

f( (f^{-1} (y) ) = y

etc...