Not at all. You need Wolfram Alpha to get an _approximation_ to the solution. The equation itself already was solved in the video before Wolfram Alpha was used. Why do sooooo many people think that an equation is only solved after one gets a numerical value and don't care at all that this numerical value usually is _not_ really the solution, but only an approximation to the solution? That is _not_ what "solution to an equation" actually means!
I should've tried this technique on tests where I couldn't figure things out. "The answer is B(5), where B is a function I'm defining right now that will solve this problem."
Once you have it in that form, you can calculate the answer numerically using newton approximation to any level of precision you want. It’s time consuming but you can do it.
Well it is exactly how this work and that B function might be numerically approximated easier than W. But of course standardized methods are preferred.
@@empathogen75 As I think you are saying it is much less work to just use newton's method on the original equation . I am not really impressed with this Lambert W jazz .
Can you solve by hand sin(2.71828)? W is simply defined as the inverse function of z(e^z). Nothing more, nothing less. Just like (one) definition of sin(x) is to consider a unit-radius circle centered at the origin and looking at the relationship between an angle and the vertical coordinate of the point on the circle at that angle.
@@MadaraUchihaSecondRikudoIt’s actually surprisingly easy to calculate square roots (At least of whole numbers). If you convert the number to base 2, there’s a pretty simple pattern that can find the square root by hand. (There are technically patterns that work for higher bases to find square roots, but they’re fiendishly complicated. The base 2 pattern could be done by the average fifth grader)
@@Programmable_Rook Yeah, but this isn't the sqrt of a whole number, just like this isn't the W of a whole number. My point stands, it's a less well-known but no less well-defined function, whose values you generally need a calculator to find.
Ngl when I saw the question I start by guess it’s 2 and start using the calculator to make the number more specific by adding digits and actually got like 1.7158 sth lol within probably a minute
LambertW function is not a hack. It's a well-defined and researched function that can be numerically approximated. I understand why it may feel otherwise, particularly when you're seeing it for the first time. You may consider the situation as similar to how sqrt(-1) may have once felt to you before recognizing the vast world of complex numbers.
@@ir2001 yeah but it’s made up they just said this is now the inverse of that because I say so kind of like imaginary numbers they were just defined as the solution to negative square roots
@@luisfilipe2023 True, but I beg to disagree with the characterization. Keeping LambertW(x) aside for a moment so as to keep my explanation understandable by means of an analogy, how about ln(x)? You may call it merely an inverse of the exponential function, but on further analysis you would realise that it can be expressed as an integral, which can in turn be computed via numerical approximation methods. Therefore, you get an additional weapon for your Math arsenal. Essentially, resourceful abstractions help simplify our expressions without loss of precision.
All of mathematics is "just made up". The so-called elementary functions, such as exp, ln, sin, cos, tan, etc. were all made up at one time to solve problems, either purely mathematical or practical. Assigning a name to a particular function which is made up to solve some class of problems makes it easy to then study that function in detail. Such study can involve finding larger classes of problems which it solves, finding efficient numerical methods to find approximations, plotting graphs, studying its domain, range, etc., working out derivatives and integrals, finding a power series, etc., etc. Just look at the Wikipedia page for the Lambert W function to see how much it has been studied, for example.
Cool. I learned it in 1999. But good to see that people are still discovering the program’s features. Let me give you something bigger. Goal Seek can accommodate only one variable, but you can project backward for more variables by using the Solver add-in. With Solver you can get a solution that works for multiple variables and you can even set constraints for them.
I think people are missing the fact that the Lambert W function is not just some arbitrary inverse, otherwise Presh could have just said P(2^x+x) = 5 and stopped there. The Lambert W function has been extensively researched, has a lot of properties, and identities, and is quite useful. This is why Presh went to the trouble to reformulate the problem into the product-log form.
@@Asafh2009 and you are rude. I will continue to get older and there is nothing I can do about that. You can choose whether you get ruder or decide instead to take an opposite path.
Yeah, it's a known function I think it would be more interesting to prove that there is a solution... it's not complicated, but it requires more formality than just "solving X"
In my head, I tried x=5/3 and realized it's a bit low. SO I went for 1.7. Then Newton's method: x_new= x- (x log(2)-log(5-x))/(log(2)+1/(5-x)) immediately gives 1.7156 (on a calculator that doesn't have a Lambert function).
using logarithmic naturally reduces exponents. but no way I'm doing that in my head without scientific calculator or log chart. In the past, majority of these exams were calculator free. So whenever these type of video mentions Harvard entrance exam or something, assume you can't use calculator. but in modern times they allow use of calculators with limited functionality. Even ACT (American College Testing) and other Professional College assessment exams such as MCAT (medical college assessment test) provided their own none scientific calculators in the past. This magical function lets you solve this without calculator. If you use windows, open up your calculator and set it to standard. that's basically what you were allowed to use IF they allowed calculators.
I remember something from school about Newton-Rapherson approximation of integrals from about 1980. I just did trial and error on a calculator and got 1.7156207 ish in no time. How do you suppose a calculator does logarithms?
@@angrytedtalks It sort of does the same thing. Look up CORDIC. It's an algorithm to find trig functions that they ended up expanding for other transcendental functions from logs to hyperbolics.
Yep newton raphson rocks Numerical estimation optimization methods are such a blessing to humanity Sad that i dun remember many of them now Only newton raphson and steepest hill descent
W(x)=Xe^X is it's definiton. Do you know precisely what log does? do you know what sine does? do you know what cosh does? At the end of the day, those functions are defined by what they do, and what they do is well known. W doesn't evaluate to a nice rational number, because it is based off the number "e", which is a mathematical constant. (like Pi) W(x) = x*e^X
And to those complaining, we got a near identical question in our Cambridge maths entrance exam, the very paper I sat had a question with the lambert-W function. Don’t believe me, look up STEP II 2021 Q4. Not something I had ever learnt in school or heard of at the time, but given its introduction I was still able to do the question. It’s not about solving the question for an exact answer using a calculator, but it’s about understanding and applying new techniques to gain an analytic closed form solution to an unseen problem. It actually tests your true mathematical ability.
@@Crand0m Yeah, if it's meant to test peoples ability to utilize unfamiliar functions, it should first introduce the function that's meant to be unfamiliar to you. This feels like Harvard punishing people for not knowing information that many haven't been taught.
@@dylanbowes427 it is indeed, for year 13s (17-18yos). That’s why it has a reputation for being the hardest maths exams in the UK at high school level. Most questions can be solved with basic high school knowledge, but you need to be an excellent problem solver and apply it in clever ways
I got a PhD in math without ever hearing about it It's not terribly important. But now that it's built-in to mathematical software a bunch of people think it's fair game for math puzzles. But really, there are countless functions that have inverses that we cannot put in closed form. How interesting is this particular one? I guess it depends on how often you want the inverse of a specific function. It's nice that Woflram-Alpha apparently has decided to hard-code this, but for the most part we don't want to work with functions that are not in a closed form of combinations of simple computations. Existential proofs that certain functions have inverses aren't very interesting, in general. There are infinitely many (uncountably many!) 1-1 functions and they're all invertible. I don't see what the appeal is here.
I got a PhD in physics without ever hearing about it. Only in the last about 5 years, I keep seeing TH-cam videos about it... :D But as others already have mentioned: It apparently has lots of applications in physics.
@@Ninja20704 Lol. Verkuilb meant to follow up a video, not follow-up a video. Lol. Follow up is verb meaning sequential action. The act of following of a video by releasing another video. Follow-up is noun or adjective used when describing what you are referring to. A follow-up is a prompt and relevant response to a situation often in context of addressing a problem or providing additional information. So if you make up a follow-up appointment with a doctor, it means to check up on the same thing again to see how you're doing. But if you make a follow up appointment with a doctor, it just means your next visit.
I solved the problem in a slightly different way, and got x = log2( W(32 * ln(2)) / ln(2) ). When I plugged it into a calculator, I got the same result as Presh: 1.71562. I was a bit freaked out as to how two different-looking answers could give the same result without any obvious conversion between them, but then I noticed that both answers contain W(32 * ln(2)) / ln(2). If we call that quantity Y, then Presh's answer was x = 5 - Y, and mine was x = log2(Y). The only way these two answers could be the same is if Y = 5 - x = 2^x, which would imply that 2^x + x = 5, and oohhhh I get it now.
@@kirstenwilliams9246 In that case, you probably did something similar to what I did, which was to coerce the left-hand side into the form z*e^z. IIRC, I started by raising e to the power of both sides to convert the addition into a multiplication: e^x * e^(2^x) = e^5. Then substitute y = 2^x to get rid of the nested exponent: y^log2(e) * e^y = e^5. After raising both sides to the power of ln(2) (to eliminate the exponent in y^log2(e)) and multiplying both sides by ln(2), I got (y*ln(2)) * e^(y*ln(2)) = 32*ln(2), at which point I applied W() to both sides and it was all downhill from there. Presh took a different approach, in which he moved all the variables to the right-hand side in a way that got it into the form z*e^z without the "raise e to the power of both sides" step. I had no clue where he was going until around 7:05.
It is worth to mention that the Lambert-W function isn't exactly one function. To invert x * e^x in the real domain one needs two different branches of the Lambert-W functions, otherwise there would be two function values for x between -1/e and 0. Meaning that for x between -1/e and 0 only one of the two function branches might give you the desired solution, and in that case it's pretty tricky to know which one. Also, x < -1/e doesn't yield any real solution.
As I was fighting Comment Wars, I also researched that, most of it went above my head as only this semester I'm going to study Complex Analysis so. But it was interesting. I enjoyed it.
The equation we ended up with here, is u*(e^u) = 32*ln(2) where u = (5-x)*ln(2) . Since the righthandside , 32*ln(2) , is real and positive, this equation has only one real solution for u ; or in other words, only _one_ branch (of the infinitely many branches) of the Lambert W Function leads to a real solution, namely u = W₀( 32*ln(2) ) . In general, consider the equation u*(e^u) = y If y is real and positive, then only u = W₀(y) is real (and it's also positive); all other branches u = Wₖ(y) would be complex-valued. If y is real and between -1/e and 0, then both u = W₀(y) and u = W₋₁(y) are real (all other branches would be complex-valued), with W₀(y) being between -1 and 0 , and W₋₁(y) being less than -1 . If y is real and less than -1/e, then there are no real solutions; all branches u = Wₖ(y) would be complex-valued. In other words: there are two real branches for W(y) _only when_ y is real ánd between -1/e and 0 . (Please note: you seem to mix up x and y . If we think of x as the real variable of the real function f(x) = x*(e^x), as your comment seems to be suggesting, then it's y = f(x) that is between -1/e and 0 , for which there exist two real branches of inverses x = W(y) (namely one branch x < -1 , and one branch x between -1 and 0). And for real y > 0 , there is only one real branch x = W(y) , and it's also positive.)
OTHER SOLUTION -> It would’ve also been possible to use Newton technique to solve the non-linear equation. The problem is equivalent of finding the root of f(x) = 2^x + x -5. You can then use the algorithm x_(n+1) = x_n + f(x)/f’(x) with a desired precision to solve. Finally for the initial approximation you could simply use something between 1 and 2 juste by looking at the equation. By doing multiple iteration, the algorithm would converge toward the numerical solution.
Great video ! Small precision, xe^x isn’t injective, so if you want to be formal the W function have to be considered in the interval ]-inf, -1] Or in the interval [-1, +inf[ This comes from the fact that the derivative of xe^x is e^x +xe^x, which is negative before -1 and positive after. Maybe we should talk about tho separate function W1 and W2
x+2^x is monotone and continuous, x=1 too small, x=2 is too large, so the only one solution is in between. Use a bisection method to find it. As good as any other fancy Stanford, Lambert W function. Less fancy but still as accurate, right?
first try x=1 and x=2 to see that the solution must be closer to 2 than 1. now assume x = 2 - y and use 1st-order Taylor for exponential [note: 2^x = exp(x.ln2)]. then you get a linear equation in y with solution y = 1/(1+4.ln2) = 1/(1+4*0.69) = 0.265 (surely every one remembers ln(2)=0.69 ... think about half-life of exponential decays like in radioactivity). this then gives x = 2 - y = 1.735 without use of any special functions or a calculator ... all paper and pencil. and x = 1.735 is pretty close to the actual answer of 1.7156.
I like this one and this is also what I did. You can also do the next order Taylor expansion for 2^x and just get a quadratic equation to manage. You can get within 1% of the right answer that way...
I used an alternate method to solve it that doesn’t require computers (but it does use derivatives.) !! I used linear approximation in which L(x)= f(a)+f’(a)(x-a), where L(x) is an approximation, a is a similar number to the one you!re trying to find, and x is the value you!re trying to find. Basically, which this formula, you can approximately find any value of any equation as long as you know something of a similar value! For example, in this equation, I quickly noticed that 2^2+2=6 , which is pretty close to 5. So, I established that a=2. That’s it !! All you do now is solve the equation. f(x)= 2^x +x L(x)= (2^a+a) + ( ln(a)+2^a )(x-a) 5 = 2^2+2 + (ln(2)+(2^2))(x-2) 5= 6 + (ln(2)+4)(x-2) -1= (ln(2)+4)(x-2) (-1/(ln(2)+4))+2=x x= 1.78!! The answer is a bit off because its still an approximation, but it’s much better than using computers in my opinion.
Usually these are all approximated using series expansions for the functions. Which ones are used depends on the implementation; historically (40 years ago, when I had to write routines for those things as part of my education) it was a trade off between speed of convergence and amount of memory required to achieve the desired precision. Nowadays, I suspect people go for speed a lot more...
By using trial and error one can show the x lies between 2 and 1...and by choosing the mid section of this range, such that x=3/2....we find that the answer is much closer to 5....so the the range is between (3/2 , 2) By minimizing the range : (3/2 + 1/5 , 2 - 1/5)... ,one can get an approximate answer
i have an easier way to solve this (by approximation) (calculator not used) 2^x + x is an increasing function so we check by putting value the range of x b/w to natural numbers x equals 1 gives 3 x equals 2 gives 6 x equals 3 gives 11 and so on now we have got that 1
For everyone complaining, consider ln(5) (natural log) If the answer was ln(5), would you say that it's an exact solution? If so, why would W(5) (lambert W) not also be an exact solution?
ln() is considered a function in closed form. W() is not. ln x has been computed with a hand-held calculator for a very long time. W() is not easily computable. The Taylor series for ln x is easily written with coefficients in a closed form. The same is not true for W().
@@rickdesper "ln() is considered a function in closed form" What is that supposed to mean? I never heard about a "function in closed form". "The Taylor series for ln x is easily written with coefficients in a closed form. The same is not true for W()." W has a rather simple Taylor series, what are you talking about?!?
@@rickdesper Lambert's W function can be computed with a hand-held calculator using Newton's Method, the same method you would use for calculating log(x) if your calculator doesn't have a log function. The W function also has a Taylor series with coefficients in a closed form. The coefficients for the Taylor series around 0 are (-n)^(n-1)/n!
"If so, why would W(5) (lambert W) not also be an exact solution?" Because the W function is not explained in any detail. Just watching the video, it looks like Presh has pulled a magic word from nowhere and defined it as the solution. This is leaving some of us (or maybe just me) mystified and confused. Now, given any complex equation, it looks like I can define the Mandolinic M function as the solution to that equation. Job done, move on.
It definitely should. The "problem" with it is that it requires complex analysis to understand it properly, but that was never an issue with roots, so I don't see why not!
@@DemoniqueLewis I suppose you don’t need CA to learn it in the same way sqrt(x) is taught as the inverse of x^2 on a cut domain, which is taught in schools. It would be really nice to learn the common real properties of it though as with any other elementary function like log (domain, range, sketch, derivatives and integrals etc…)
i think we can use series expansion of 2^x and use as many terms as required to round up to correct answer (i.e first three terms give 1.75177), in the end it will be about solving a polynomial
Presh, this was a really well-paced and thorough explanation of the Lambert W function. Great job! Would you do a sequel looking at the sort of calculus needed to derive the approximate value?
Wish harvard was this easy to get into for asians. Regarding the transcendental equation in this question, one ultimately needs a calculator. But using graphing calculators is not it, anyone can do it. Instead doing it with a normal scientific calculator will be the best thing to ask i believe.
problems like these lend themselves to a simple methodology. Say you have a function f and want to know for what x is (f x = 5). First assume x is 1/2 the value you wish to solve. So for example, say you have f x = x *x -- ie, f is the square function - f 5 = 25. Now, you want f x = 5 -- which means you are finding the square root of x. Assume x = 1/2 of 5 -- 2.5. But 2.5 squared is 6.25 -- too big. now you know that for f x = x *x that for f x = 5, x is between 0 and 2.5. Next you guess that x is 1/2 between 0 and 2.5 which is 1.25 - of this is too small (1.2 * 1.2 => 1.44), so the answer lies between 1.25 and 2.5. Try it on this problem, you'll see that quite quickly zero in on the right value. There are functions for which this doesn't quite work -- there are local behavior (like a dip) that throws it off - in those case, you can randomly choose starting values, etc. Almost always this simple method works and it easy enough to figure out when it requires some simple tweaking.
I always forget about the Lambert function because W(x) doesnt mean anything to me. Plus, minus, square root, etc all have common sense meanings but it seems to me that W is an implied logic function as opposed to a mechanical function. If you say the solution is W(32ln2) its not clear what that is in real numbers or even a ballpark guess.
The Lambert W function is just a terrible function to work with. It's a mess to calculate, it has two separate branches on part of its domain (because x*e^x isn't one-to-one over its range), and it has sum and difference formulas that are a pain to remember. I can't believe a problem requiring its use appears on a college entrance exam.
It's not "clear" because you are not familiar with the function. How much is sin(2.71828)? Someone not familiar with trigonometric functions would have no clue; that does not make it poorly defined. I don't understand what you mean by "mechanical function" - W is neither more nor less mechanical than (say) sin.
Draw a graph of the relation/function y = f(x) = x*(e^x) . Since 32*ln(2) is real and positive, W( 32*ln(2) ) is the x-coordinate of the _only point_ on the graph for which the y-coordinate equals 32*ln(2) . In general, W(y) * e^W(y) = y .
@@ThreePointOneFou A simple approach to this problem would be to rewrite the equation as 2^x = 5 - x , then sketch the graphs of f(x) = 2^x and g(x) = (5 - x) into one diagram, and estimate the coordinates of the intersection point of f(x) and g(x) . No Lambert W Function needed. (This approach would also demonstrate clearly that there exists only one real solution.)
I actually think the lambert w function is a legitimate way to solve it, but if you just want a numerical answer, newton’s method would have been a lot faster.
2^x + x = 5, 2^x = 5-x = y = => x = 5 - y. 32*2^(-y) = y, y*2^y = 32. y*e^(ay) = 32, where a = log(2). (ay)e^(ay) = 32a > 0 = => ay = W0(32a) = => x = 5 - W0(32a)/a. There is a second branch of W-function, W(-1)(z), for z < 0. W function's branches cannot be expressed in terms of elementary functions.
bro humiliated me (an indian 9th grader) in every single way by saying, "i wasn't able to go to harvard, that's why i went to stanford 0:23 ". btw: thanks for uploading such glorious content, your daily uploads makes my day, everyday.
@@KookyPiranha It's trivial, provided you know what W(x) is. Unless they introduced it before this question, this entrance exam seems more like a mathematics themed trivia quiz.
2^x + x - 5 = 0 Substitute -3,-2,-1, 0, 1, 2, 3 to see which values give a negative and positive answer and by how much. The answer will be a value between the two answers where the sign switches. In this case x =1 and x=2 Substitute fractions in between to find the answer.
@Blackpenredpen does a lot of videos (think a whole playlist's worth) re: Lambert W function and explains it rather well... Bonus - he also uses "fish" to explain it! 😂
Alive without breath; As cold as death; Never thirsting, ever drinking; Clad in mail never clinking. Drowns on dry land, Thinks an island Is a mountain; Thinks a fountain Is a puff of air. So sleek, so fair! What a joy to meet! ***************** We only wish To catch a fish, So juicy-sweet!
I believe my first comment "disappeared"... @Presh- Thanks very much. I'll look into Lambert W (I did attempt a guess at x=1.7; but it was a guess, and not a solution. Take good care, Presh. Thanks again !
The W function is cool. And it lets you carry around an exact form, it’s still approximate when reduced to numbers. It would be nice to include it in BLAS software
I am writing this comment before I watch the video, and will edit it after I watch it. My initial impression from just the thumbnail is... no way would a college entrance exam question involve the Lambert W function, right? Nobody would expect high school kids to know about the Lambert W function, right? EDIT: ...huh.
Possibly not - but if this were an interview question (rather than a written one), the interviewer could ask something like "imagine that you have a function that is the inverse of x(e^x) - could you solve it then?"
We literally got a question like this in our STEP exam for Cambridge maths, despite having never learnt it in school. It’s about how you well and quickly you are able to understand and apply totally new concepts
It's a fairly well-known tactic for top-level universities. That's why they sell their own math and physics textbooks to prepare students for entrance exams.
Here is a quick way to approximate: It’s easy to argue that there is a single unique solution 1 < x < 2 because at x=1, 2^x + x = 3 and at x=2, it’s 6. Linear interpolation would give x=1.67, but we know the function 2^x + x is convex, so the solution should be a bit higher, so we will round it up and say roughly 1.7.
The W is quite a bit like normal logarithms, you usually "solve" them as well by means of the deux ex machina that we call a calculator (except no ordinary calculator has the W function). Side note: I'm 50 with an MSc in applied physics, and I heard of the W function only a few years ago. Definitely never learned about it in school...
in math, you often answer with functions. its same as answering with x = sin (x) or fun(x) = x^2 as long as its actual function that works in that specific general instance, its acceptable answer. since it saves time on writing out the entire page of equations. would you rather write X = 5 - w(32ln2)/ln2 or x = 5 - {ln(x/lnx) - {ln(x/lnx)/[1+ln(x/lnx)]} ln(1-lnlnx/lnx)}(32ln2)/ln2 i
@@Yiryujin the second One. I don't Need elegance if not explained. Moreover in the video Is talked like and operator like sin and cos (without demonstration ok) but you associate It like a substitution (nothing special if you think It would have been the third One in the example)
@@lucabastianello9830 Actually, the two expressions are NOT equivalent. The second one is an expression representing a lower bound for W in the original solution. It is an operator - or better, a multi-branched function. Neither more nor less so than the 'normal' logarithm.
it has 2 complex and one real solutions. however, newtons procedure did not find a result: 10 print "mind your decisions-solving a harvard university entrance question" 20 z=5:sw=z/19:goto 40 30 a=ln(abs(sin(b)/b))/ln(2):dg=exp(a*ln(2))*cos(b):dg=(dg-a-z)/z:return 40 b=-5:gosub 50:goto 100 50 gosub 30 60 b1=b:dg1=dg:b=b+sw:if b>20*z then stop 70 b2=b:gosub 30:if dg1*dg>0 then 60 80 b=(b1+b2)/2:gosub 30:if dg1*dg>0 then b1=b else b2=b 90 if abs(dg)>1E-10 then 80 else return 100 gosub 110:goto 120 110 print "x=";a,"%",b;"*i":return 120 b=b+sw:gosub 50:gosub 110 130 x=-10:print "die reelle lösung ist x=";:goto 150 140 dg=(2^x+x-z)/z:return 150 gosub 140 160 x1=x:dg1=dg:x=x+sw:x=x+sw:x2=x:gosub 140:if dg1*dg>0 then 160 170 x=(x1+x2)/2:gosub 140:if dg1*dg>0 then x1=x else x2=x 180 if abs(dg)>1E-10 then 170 190 print x mind your decisions-solving a harvard university entrance question x=-5.0304466 % -3.24091965*i x=-5.03046368 % 3.04819125*i die reelle lösung ist x=1.71562073 > run in bbc basic sdl and hit ctrl tab to copy from the results window
I always like to solve these problems iteratively. In this case, start with a guess for x0 between 0 and 5. The next iteration x1 comes from setting 2^x1 +x0 = 5 or x1 = (ln(5-x0))/ln(2). The next iteration gives x2 = (ln(5-x1))/ln(2), and so on. This converges rapidly. If you try it the other way, ie, 2^x0 +x1 = 5 or x1 = 5 - 2^x0, it doesn't converge.
Do you think that x in 5^x = 2 is better defined? (I think it's just that you are not familiar with W - in principle it's no different than any other function)
An economy university student once taught me to make a graphic instead of trying to solve it mathematical. And you can also try out numbers with decimals to get a good rounded result. It took me 4 attempts to get to 1.8. I tried 1 -> 3, 2 -> 6, 1.5 -> 3.75, 1.8 -> 5.04. 1 was too small and 2 too big. Looking at the results it must between 1.5 and 2, but closer to 2. Hence 1.8 was chosen as the next input. If I continue for more decimals then 1.79 -> 4.9941, 1.791 -> 4.998681, etc. The time to do this with a calculator beats the mathematical solve, which you also have to round up or down.
All of Higher Math's videos are about this base use of the Lambert function😂 What a joke,lol. I doubt it has anything to do with any entrance exam ever!
Lambert function is, imo, just a way to write x=something where you have an expression you can't analitically explicitate. It may be the way they wanted at that entrance exam. I would've just proceeded by writing it as 2^x = 5-x then plotting y=2x and y=5-x and figure out an approximate value by trials choosing the starting value of x by that graphic.
Once Presh went to an interview for the job at a Maths institute. The interviewer asked every candidate the same question - "Do you stand for humanity?" Many candidates replied yes and were rejected instantly. A candidate even replied no but was also rejected. When Presh was asked the same question, he said - "Your question has ambiguity. Does "U" mean the letter U or me as a person? Be clear cause the probability of my replies will change. Interviewer said - "Should we appoint you as the chairperson of this institute?"😂😂😂
If it was the letter "U" he would have used "Does" instead of "Do". Hence the interviewer definitely meant "you". (Considering he had the basic language knowledge)
I don't have an exact solution, but with just a basic calculator and guess and test methodology I got to the approximation of x=1.715 in about 2 minutes.
Another simple but laborious method can be the so called "bifurcation" method. i x =2, 2^x+x=6 if x=1 then 2^x+x=3. Therefore, the value of x must be between 1 and 2. let's take a half of 1+2 which is 1.5. Then solve it and if we take enough iterations we reach the value of 1.76...
Listening to your explanation, I must come to the conclusion that I not only wouldn’t have gotten into Harvard, I don’t even think we share a common language. The more you spoke the less I could comprehend.
I used this extremely simple Python Program to get an approximate solution to this., import math as m x = 1 while True: if m.pow(2,x) + x >= 4.9999 and m.pow(2,x) + x
Simply put value of x to make LHS equal to RHS. If we put 1 we got 3 which is less than 5 then for x=2 we got 6 which is greater than 5 so the answer is between 1 to 2 . If it is Mcqs so easily got it . For accurate answer we have to go for newton raphson method by which we will get the answer 1.71…
I'm glad I stopped trying to solve it after a while on my own. All I know are basic log rules. At some point you just realize there are only so many ways to rewrite the equation and you need some help :P. I have never heard of the Lambert W function before, but it sure was interesting to learn about it, especially with copilot's help. So I assume the lambert W function is in our calculators somewhere? It better be or I have no idea how the harvard students are doing this exam! I assume its all still paper and pencil
They wouldn't let me within a 1000 miles of Harvard, so I don't have to worry about passing their exam. My pocket calculator doesn't have the Lambert W() function, so I guess I'm SOL. Not so fast. In my podunk school they taught me fixed-point iteration and Newton-Raphson iteration for finding real roots of nonlinear functions. We can write x←5-2^x, x←ln(5-x)/ln2, or x←e^ln(5-2^x), and maybe some other forms. A plot will show that a root is around 1.7, and one of the iterative forms should converge, starting with x=1.7. x←f(x) will converge when |f'(x)|
if x = 1 then 3 = 5 if x = 2 then 6 = 5 1 < x < 2 5 - 3 = 2 6 - 3 = 3 2/3 = 0,6667 Meaning that x is approximately 1,6667 Then using calculator I refined it to 1.71562 My initial approximation was less than 3% off
you can also arrive at an approximate value using the Taylor Series at a=1.5. This simplifies the equation to a polynomial and we all can solve polynomials :3
I used 1.5 as an estimate. Inserting x=1 is too small and x=2 is too large. So the actual answer might be around the middle. The higher order of derivatives you go, the more accurate answer you can get. But just the first derivative also approximates the answer quite well.
There is no "Harvard University Entrance Exam." My answer would be "it's a number between 1 and 2. We can use a computer to approximate it." My other answers would be "why do you want this?" and "You know there's no closed form for the inverse to 2^x +x, right?"
Ive lost my trust in youtubers. I’d love to say i learned something but now that u didn’t explain the inner workings of the W function I’m going to need to watch another video to learn about that. Thanks
There are no more "inner workings" to it than the definition, which Presh has spent the first half of the video in explaining. What "inner workings" are there to the square root of something?
Why can't you solve this quadratically? As in, ln2^x*x = ln5, x2^x = 5, 2^x = 5/x = 5 - x, 5 = 5x - x^2, x^2 - 5x + 5 = 0. Use the quadratic formula and you get 1.38 and 3.61
Somehow I got into Harvard without having ever heard of the Lambert-W function. Go figure. Thanks, Presh, for the introduction. I'll do some more research into it. 🤓
I asked my high school teacher what were exponential equations used for: "To graduate high school" he answered I asked my college teacher the same question: "To graduate high school" he answered
My intuitive guess was sqrt(3). It turns out to make more sense than the Lambert W-func form even though sqrt(3) is a bit off. Lambert W is just a nice way of putting stuff into place to solve numerically anyways. How is it even considered a solution?
It's called the W function because in the end you need to use Wolfram-Alpha to solve the equation.
Not at all. You need Wolfram Alpha to get an _approximation_ to the solution. The equation itself already was solved in the video before Wolfram Alpha was used.
Why do sooooo many people think that an equation is only solved after one gets a numerical value and don't care at all that this numerical value usually is _not_ really the solution, but only an approximation to the solution? That is _not_ what "solution to an equation" actually means!
@@bjornfeuerbacher5514
Does W have any standard numeric value like e or pi?
I know pi is irrational, still we use with approximated value..
@@arjunvarmamaths1349 Huh? W is a function, not a number.
@@bjornfeuerbacher5514
So the answer is with W??
I Mean in Harvard entrance exam , if I just put answer with W is that correct?😅
@@arjunvarmamaths1349 The answer is the one given at 10:50 in the video, which uses the function W, yes. Did you watch the video?
I should've tried this technique on tests where I couldn't figure things out. "The answer is B(5), where B is a function I'm defining right now that will solve this problem."
Once you have it in that form, you can calculate the answer numerically using newton approximation to any level of precision you want. It’s time consuming but you can do it.
@@empathogen75you can calculate the answer numerically to arbitrary precision without any knowledge of lambert W functions etc.
Well it is exactly how this work and that B function might be numerically approximated easier than W. But of course standardized methods are preferred.
"The exact form of B(x) is an exercise left to the grader."
@@empathogen75 As I think you are saying it is much less work to just use newton's method on the original equation . I am not really impressed with this Lambert W jazz .
So it still can't be solved by hand and needs a computer/calculator and I still don't know what a Lambert function is. I'll call it a day.
Can you solve by hand sin(2.71828)?
W is simply defined as the inverse function of z(e^z). Nothing more, nothing less. Just like (one) definition of sin(x) is to consider a unit-radius circle centered at the origin and looking at the relationship between an angle and the vertical coordinate of the point on the circle at that angle.
If we were to replace W with ln or with sqrt in the solution, do you think you'd have been able to get a number without a calculator then?
@@MadaraUchihaSecondRikudoIt’s actually surprisingly easy to calculate square roots (At least of whole numbers). If you convert the number to base 2, there’s a pretty simple pattern that can find the square root by hand.
(There are technically patterns that work for higher bases to find square roots, but they’re fiendishly complicated. The base 2 pattern could be done by the average fifth grader)
@@Programmable_Rook Yeah, but this isn't the sqrt of a whole number, just like this isn't the W of a whole number. My point stands, it's a less well-known but no less well-defined function, whose values you generally need a calculator to find.
Ngl when I saw the question I start by guess it’s 2 and start using the calculator to make the number more specific by adding digits and actually got like 1.7158 sth lol within probably a minute
I’ll never not be amazed by mathematicians ability to just make stuff up and call it the day
Exactly my thoughts, its fascinating and frustrating at the same time that i have no idea how it works.
LambertW function is not a hack. It's a well-defined and researched function that can be numerically approximated.
I understand why it may feel otherwise, particularly when you're seeing it for the first time. You may consider the situation as similar to how sqrt(-1) may have once felt to you before recognizing the vast world of complex numbers.
@@ir2001 yeah but it’s made up they just said this is now the inverse of that because I say so kind of like imaginary numbers they were just defined as the solution to negative square roots
@@luisfilipe2023 True, but I beg to disagree with the characterization.
Keeping LambertW(x) aside for a moment so as to keep my explanation understandable by means of an analogy, how about ln(x)? You may call it merely an inverse of the exponential function, but on further analysis you would realise that it can be expressed as an integral, which can in turn be computed via numerical approximation methods. Therefore, you get an additional weapon for your Math arsenal.
Essentially, resourceful abstractions help simplify our expressions without loss of precision.
All of mathematics is "just made up". The so-called elementary functions, such as exp, ln, sin, cos, tan, etc. were all made up at one time to solve problems, either purely mathematical or practical. Assigning a name to a particular function which is made up to solve some class of problems makes it easy to then study that function in detail. Such study can involve finding larger classes of problems which it solves, finding efficient numerical methods to find approximations, plotting graphs, studying its domain, range, etc., working out derivatives and integrals, finding a power series, etc., etc. Just look at the Wikipedia page for the Lambert W function to see how much it has been studied, for example.
Learning about the “Goal Seek” feature in Excel alone was worth the cost of admission. Thanks!
I'd never seen that function either.
Cool. I learned it in 1999. But good to see that people are still discovering the program’s features. Let me give you something bigger. Goal Seek can accommodate only one variable, but you can project backward for more variables by using the Solver add-in. With Solver you can get a solution that works for multiple variables and you can even set constraints for them.
@@michaelwisniewski6047 at which point I've gone and gotten my LP solving library ;) (which is probably what excel is doing anyway)
I thought the same!
yeah new thing to learn in excel
I think people are missing the fact that the Lambert W function is not just some arbitrary inverse, otherwise Presh could have just said P(2^x+x) = 5 and stopped there. The Lambert W function has been extensively researched, has a lot of properties, and identities, and is quite useful. This is why Presh went to the trouble to reformulate the problem into the product-log form.
Yeah, plus there are math programs (like Wolfram Alpha / Mathematica) that have a predefined W function for you to use.
You are old
@@Asafh2009 and you are rude.
I will continue to get older and there is nothing I can do about that.
You can choose whether you get ruder or decide instead to take an opposite path.
agreed! people are being a bit ignorant
im sure other inverse functions were once seen in this way as well, being considered "diselegant"
Yeah, it's a known function
I think it would be more interesting to prove that there is a solution... it's not complicated, but it requires more formality than just "solving X"
In my head, I tried x=5/3 and realized it's a bit low. SO I went for 1.7. Then Newton's method: x_new= x- (x log(2)-log(5-x))/(log(2)+1/(5-x)) immediately gives 1.7156 (on a calculator that doesn't have a Lambert function).
😮😮😮
using logarithmic naturally reduces exponents. but no way I'm doing that in my head without scientific calculator or log chart.
In the past, majority of these exams were calculator free. So whenever these type of video mentions Harvard entrance exam or something, assume you can't use calculator.
but in modern times they allow use of calculators with limited functionality.
Even ACT (American College Testing) and other Professional College assessment exams such as MCAT (medical college assessment test) provided their own none scientific calculators in the past.
This magical function lets you solve this without calculator. If you use windows, open up your calculator and set it to standard. that's basically what you were allowed to use IF they allowed calculators.
I remember something from school about Newton-Rapherson approximation of integrals from about 1980. I just did trial and error on a calculator and got 1.7156207 ish in no time. How do you suppose a calculator does logarithms?
@@angrytedtalks It sort of does the same thing. Look up CORDIC. It's an algorithm to find trig functions that they ended up expanding for other transcendental functions from logs to hyperbolics.
Yep newton raphson rocks
Numerical estimation optimization methods are such a blessing to humanity
Sad that i dun remember many of them now
Only newton raphson and steepest hill descent
What's the point of all this when there is no explanation of what the W function does??
W(x) is just a inverse of f(x) = x•e^x. As we don't know how to write it in the algebraic form so we just use symbols.
W(x)=Xe^X is it's definiton.
Do you know precisely what log does? do you know what sine does? do you know what cosh does?
At the end of the day, those functions are defined by what they do, and what they do is well known.
W doesn't evaluate to a nice rational number, because it is based off the number "e", which is a mathematical constant. (like Pi)
W(x) = x*e^X
All you have to do to solve the equation is set the calculator to Wumbo
@@meateaw Small correction - W(x) is the inverse of x(e^x)
how do we input W function on a scientific calculator?
And to those complaining, we got a near identical question in our Cambridge maths entrance exam, the very paper I sat had a question with the lambert-W function. Don’t believe me, look up STEP II 2021 Q4. Not something I had ever learnt in school or heard of at the time, but given its introduction I was still able to do the question.
It’s not about solving the question for an exact answer using a calculator, but it’s about understanding and applying new techniques to gain an analytic closed form solution to an unseen problem. It actually tests your true mathematical ability.
This makes a lot of sense. Clever test design
That's fine if you're given the definition of the function. Just expecting people to know of it's existence is not a good question.
@@Crand0m Yeah, if it's meant to test peoples ability to utilize unfamiliar functions, it should first introduce the function that's meant to be unfamiliar to you. This feels like Harvard punishing people for not knowing information that many haven't been taught.
Apologizes for my ignorance, but Is this for undergrad? I find it hard to believe that they give that exam to 18 year olds
@@dylanbowes427 it is indeed, for year 13s (17-18yos). That’s why it has a reputation for being the hardest maths exams in the UK at high school level. Most questions can be solved with basic high school knowledge, but you need to be an excellent problem solver and apply it in clever ways
The Lambert W function was never mentioned in my High School or University maths subjects (in the 1970's !). Thanks for the info.
Hallelujah! Finally someone who has a sane reaction to learning something new. Thank _you!_
I got a PhD in math without ever hearing about it It's not terribly important. But now that it's built-in to mathematical software a bunch of people think it's fair game for math puzzles.
But really, there are countless functions that have inverses that we cannot put in closed form. How interesting is this particular one? I guess it depends on how often you want the inverse of a specific function.
It's nice that Woflram-Alpha apparently has decided to hard-code this, but for the most part we don't want to work with functions that are not in a closed form of combinations of simple computations. Existential proofs that certain functions have inverses aren't very interesting, in general. There are infinitely many (uncountably many!) 1-1 functions and they're all invertible.
I don't see what the appeal is here.
@@rickdesper It has significant amount of use in physics, chemistry and biosciences.
I got a PhD in physics without ever hearing about it. Only in the last about 5 years, I keep seeing TH-cam videos about it... :D But as others already have mentioned: It apparently has lots of applications in physics.
Let me get this straight-you follow up a video about whether 3x5 is the same as 5x3…with this???
🤯
Hahahaha 😂😂
Well, you can't deny that he's got some range to his videos... 😊
ahahhhaaahahah. love it. wish this type of videos were around when I went to high school. then I may have actually grew to like and enjoy math.
Common Core...
It is not a follow up video, it is just two seperate/unrelated videos he is uploading
@@Ninja20704 Lol. Verkuilb meant to follow up a video, not follow-up a video. Lol.
Follow up is verb meaning sequential action. The act of following of a video by releasing another video.
Follow-up is noun or adjective used when describing what you are referring to. A follow-up is a prompt and relevant response to a situation often in context of addressing a problem or providing additional information.
So if you make up a follow-up appointment with a doctor, it means to check up on the same thing again to see how you're doing.
But if you make a follow up appointment with a doctor, it just means your next visit.
I solved the problem in a slightly different way, and got x = log2( W(32 * ln(2)) / ln(2) ). When I plugged it into a calculator, I got the same result as Presh: 1.71562.
I was a bit freaked out as to how two different-looking answers could give the same result without any obvious conversion between them, but then I noticed that both answers contain W(32 * ln(2)) / ln(2). If we call that quantity Y, then Presh's answer was x = 5 - Y, and mine was x = log2(Y). The only way these two answers could be the same is if Y = 5 - x = 2^x, which would imply that 2^x + x = 5, and oohhhh I get it now.
@@danmerget EXCELLENT!! That is just 1 of the many reasons that I love math - that there's more than just 1 way!!
I was scrolling the comments to check my answer because I got this answer too!
@@kirstenwilliams9246 In that case, you probably did something similar to what I did, which was to coerce the left-hand side into the form z*e^z.
IIRC, I started by raising e to the power of both sides to convert the addition into a multiplication: e^x * e^(2^x) = e^5. Then substitute y = 2^x to get rid of the nested exponent: y^log2(e) * e^y = e^5. After raising both sides to the power of ln(2) (to eliminate the exponent in y^log2(e)) and multiplying both sides by ln(2), I got (y*ln(2)) * e^(y*ln(2)) = 32*ln(2), at which point I applied W() to both sides and it was all downhill from there.
Presh took a different approach, in which he moved all the variables to the right-hand side in a way that got it into the form z*e^z without the "raise e to the power of both sides" step. I had no clue where he was going until around 7:05.
It is worth to mention that the Lambert-W function isn't exactly one function. To invert x * e^x in the real domain one needs two different branches of the Lambert-W functions, otherwise there would be two function values for x between -1/e and 0. Meaning that for x between -1/e and 0 only one of the two function branches might give you the desired solution, and in that case it's pretty tricky to know which one. Also, x < -1/e doesn't yield any real solution.
As I was fighting Comment Wars, I also researched that, most of it went above my head as only this semester I'm going to study Complex Analysis so. But it was interesting. I enjoyed it.
The equation we ended up with here, is
u*(e^u) = 32*ln(2)
where u = (5-x)*ln(2) . Since the righthandside , 32*ln(2) , is real and positive, this equation has only one real solution for u ; or in other words, only _one_ branch (of the infinitely many branches) of the Lambert W Function leads to a real solution, namely u = W₀( 32*ln(2) ) .
In general, consider the equation
u*(e^u) = y
If y is real and positive, then only u = W₀(y) is real (and it's also positive); all other branches u = Wₖ(y) would be complex-valued.
If y is real and between -1/e and 0, then both u = W₀(y) and u = W₋₁(y) are real (all other branches would be complex-valued), with W₀(y) being between -1 and 0 , and W₋₁(y) being less than -1 .
If y is real and less than -1/e, then there are no real solutions; all branches u = Wₖ(y) would be complex-valued.
In other words: there are two real branches for W(y) _only when_ y is real ánd between -1/e and 0 .
(Please note: you seem to mix up x and y . If we think of x as the real variable of the real function f(x) = x*(e^x), as your comment seems to be suggesting, then it's y = f(x) that is between -1/e and 0 , for which there exist two real branches of inverses x = W(y) (namely one branch x < -1 , and one branch x between -1 and 0). And for real y > 0 , there is only one real branch x = W(y) , and it's also positive.)
High school maths to solve is assume f(x) = 2^x+ x-5 and use Newton raphson method.
xn1= xn0- f(xn0) /f'(xn0)
That does not give the actual solution, but only an approximation to the solution.
@@bjornfeuerbacher5514 So does the useless W function.
@@1yoan3 The video showed the solution, and the W function is anything but useless. You make no sense.
@@bjornfeuerbacher5514Depends on whether you can do long division by hand - most can
@@xzxz214 ??? Sorry, I don't understand at all what this has to do with long division.
Simply use Foggy’s F-function which outputs x whenever its argument is 2^x+x, yielding the straightforward solution x=F(5) in the problem above.
Thank you for your solution. I learned something new today which is greatly appreciated!
OTHER SOLUTION -> It would’ve also been possible to use Newton technique to solve the non-linear equation. The problem is equivalent of finding the root of f(x) = 2^x + x -5. You can then use the algorithm x_(n+1) = x_n + f(x)/f’(x) with a desired precision to solve. Finally for the initial approximation you could simply use something between 1 and 2 juste by looking at the equation. By doing multiple iteration, the algorithm would converge toward the numerical solution.
That depends on whether finding a numerical approximation counts as "solving."
Great video !
Small precision, xe^x isn’t injective, so if you want to be formal the W function have to be considered in the interval
]-inf, -1]
Or in the interval
[-1, +inf[
This comes from the fact that the derivative of xe^x is e^x +xe^x, which is negative before -1 and positive after.
Maybe we should talk about tho separate function W1 and W2
*_U 2 to the Power of U_*
...sounds like a power ballad by Prince💜
Nothing Compares to U
@@otakurocklee ...apart from 5 - _x_ 😆
You are so right. That should be a song. Shades of "2 divided by zero" by the Pet Shop Boys.
Or "One and One is One" by Medicine Head: the greatest Boolean logic single of all time!
When Presh said "...and all that remains is to show that...", the auto-caption capitalized All That Remains, because it is a metalcore(?) band :D
x+2^x is monotone and continuous, x=1 too small, x=2 is too large, so the only one solution is in between. Use a bisection method to find it. As good as any other fancy Stanford, Lambert W function. Less fancy but still as accurate, right?
Play around on the calculator for a minute and x is something like 1.71562
No idea how you're supposed get that ..
I love these videos. Makes me realize I understand absolutely nothing about maths.
ok, but could we just NOT do a Lambert W Function for a week or so? The videos on that topic are getting out of hand...
just.... watch a different video? lol
How did you create that link which leads to search results?
@@ShubhamKumar-re4zvI think TH-cam does that automatically sometimes.
I mean, he could have at least explained how the wolframalpha calculates LamW
@@SchildkroeteHundFisch Yes I also think so as the search link is not clickable now
I'd seen the function a lot before, but this really crystallised the solving algorithm for me. Thanks!
I’d have just started plugging in values between 1 and 2 until getting close enough 😂
first try x=1 and x=2 to see that the solution must be closer to 2 than 1.
now assume x = 2 - y and use 1st-order Taylor for exponential [note: 2^x = exp(x.ln2)].
then you get a linear equation in y with solution y = 1/(1+4.ln2) = 1/(1+4*0.69) = 0.265 (surely every one remembers ln(2)=0.69 ... think about half-life of exponential decays like in radioactivity).
this then gives x = 2 - y = 1.735 without use of any special functions or a calculator ... all paper and pencil.
and x = 1.735 is pretty close to the actual answer of 1.7156.
I like this one and this is also what I did. You can also do the next order Taylor expansion for 2^x and just get a quadratic equation to manage. You can get within 1% of the right answer that way...
I have gone 42 years since looking at that function, our HS physics 2 teacher taught it in the last few weeks of class. Haven't seen it since.
I used an alternate method to solve it that doesn’t require computers (but it does use derivatives.) !! I used linear approximation in which L(x)= f(a)+f’(a)(x-a), where L(x) is an approximation, a is a similar number to the one you!re trying to find, and x is the value you!re trying to find. Basically, which this formula, you can approximately find any value of any equation as long as you know something of a similar value!
For example, in this equation, I quickly noticed that 2^2+2=6 , which is pretty close to 5. So, I established that a=2. That’s it !! All you do now is solve the equation.
f(x)= 2^x +x
L(x)= (2^a+a) + ( ln(a)+2^a )(x-a)
5 = 2^2+2 + (ln(2)+(2^2))(x-2)
5= 6 + (ln(2)+4)(x-2)
-1= (ln(2)+4)(x-2)
(-1/(ln(2)+4))+2=x
x= 1.78!!
The answer is a bit off because its still an approximation, but it’s much better than using computers in my opinion.
Thanks. Very educational.
The next question is: How does a calculator calculate W(x)?
Similar to how is SQRT(x), SIN(x), LN(x), etc. calculated?
Usually these are all approximated using series expansions for the functions. Which ones are used depends on the implementation; historically (40 years ago, when I had to write routines for those things as part of my education) it was a trade off between speed of convergence and amount of memory required to achieve the desired precision. Nowadays, I suspect people go for speed a lot more...
The Qs and tasks are not the hardest ones, but I like the way you treat them when providing other related info, context, connections.
I lost my shoes once. Couldn't find them anywhere. Few weeks later, I'd forgotten that I lost them and went and got them.
I love your videos. You do an excellent job of explaining everything!
By using trial and error one can show the x lies between 2 and 1...and by choosing the mid section of this range, such that x=3/2....we find that the answer is much closer to 5....so the the range is between (3/2 , 2)
By minimizing the range :
(3/2 + 1/5 , 2 - 1/5)...
,one can get an approximate answer
As he explained in the video (2:45 to 2:55), there are cases in which you want to have an exact solution, not only an approximate one.
i have an easier way to solve this (by approximation) (calculator not used)
2^x + x is an increasing function so we check by putting value the range of x b/w to natural numbers
x equals 1 gives 3
x equals 2 gives 6
x equals 3 gives 11 and so on
now we have got that 1
For everyone complaining, consider ln(5) (natural log)
If the answer was ln(5), would you say that it's an exact solution?
If so, why would W(5) (lambert W) not also be an exact solution?
ln() is considered a function in closed form. W() is not. ln x has been computed with a hand-held calculator for a very long time. W() is not easily computable. The Taylor series for ln x is easily written with coefficients in a closed form. The same is not true for W().
@@rickdesper "ln() is considered a function in closed form"
What is that supposed to mean? I never heard about a "function in closed form".
"The Taylor series for ln x is easily written with coefficients in a closed form. The same is not true for W()."
W has a rather simple Taylor series, what are you talking about?!?
@@rickdesper Lambert's W function can be computed with a hand-held calculator using Newton's Method, the same method you would use for calculating log(x) if your calculator doesn't have a log function. The W function also has a Taylor series with coefficients in a closed form. The coefficients for the Taylor series around 0 are (-n)^(n-1)/n!
The issue is that most people would be unfamiliar with W(x), so it should be introduced in the question.
"If so, why would W(5) (lambert W) not also be an exact solution?"
Because the W function is not explained in any detail. Just watching the video, it looks like Presh has pulled a magic word from nowhere and defined it as the solution. This is leaving some of us (or maybe just me) mystified and confused. Now, given any complex equation, it looks like I can define the Mandolinic M function as the solution to that equation. Job done, move on.
Never heard of Lambert W… should be added to the calculus class where logarithms and natural logs are covered.
It definitely should. The "problem" with it is that it requires complex analysis to understand it properly, but that was never an issue with roots, so I don't see why not!
Another name for it is the “Product Log function”
@@asparkdeity8717
Is that really a name for it?
@@feartheengage yes
@@DemoniqueLewis I suppose you don’t need CA to learn it in the same way sqrt(x) is taught as the inverse of x^2 on a cut domain, which is taught in schools. It would be really nice to learn the common real properties of it though as with any other elementary function like log (domain, range, sketch, derivatives and integrals etc…)
i think we can use series expansion of 2^x and use as many terms as required to round up to correct answer (i.e first three terms give 1.75177), in the end it will be about solving a polynomial
seen too many bprp videos and i immediately knew that lambert w function would be the key to solving
Same lmao. Quite suprised he showed prime newtons videos instead of his, even tho both are very good
fish e to the fish
Presh, this was a really well-paced and thorough explanation of the Lambert W function. Great job! Would you do a sequel looking at the sort of calculus needed to derive the approximate value?
Wish harvard was this easy to get into for asians.
Regarding the transcendental equation in this question, one ultimately needs a calculator.
But using graphing calculators is not it, anyone can do it.
Instead doing it with a normal scientific calculator will be the best thing to ask i believe.
problems like these lend themselves to a simple methodology. Say you have a function f and want to know for what x is (f x = 5). First assume x is 1/2 the value you wish to solve. So for example, say you have f x = x *x -- ie, f is the square function - f 5 = 25. Now, you want f x = 5 -- which means you are finding the square root of x. Assume x = 1/2 of 5 -- 2.5. But 2.5 squared is 6.25 -- too big. now you know that for f x = x *x that for f x = 5, x is between 0 and 2.5. Next you guess that x is 1/2 between 0 and 2.5 which is 1.25 - of this is too small (1.2 * 1.2 => 1.44), so the answer lies between 1.25 and 2.5.
Try it on this problem, you'll see that quite quickly zero in on the right value.
There are functions for which this doesn't quite work -- there are local behavior (like a dip) that throws it off - in those case, you can randomly choose starting values, etc.
Almost always this simple method works and it easy enough to figure out when it requires some simple tweaking.
I always forget about the Lambert function because W(x) doesnt mean anything to me. Plus, minus, square root, etc all have common sense meanings but it seems to me that W is an implied logic function as opposed to a mechanical function. If you say the solution is W(32ln2) its not clear what that is in real numbers or even a ballpark guess.
The Lambert W function is just a terrible function to work with. It's a mess to calculate, it has two separate branches on part of its domain (because x*e^x isn't one-to-one over its range), and it has sum and difference formulas that are a pain to remember. I can't believe a problem requiring its use appears on a college entrance exam.
It's not "clear" because you are not familiar with the function. How much is sin(2.71828)? Someone not familiar with trigonometric functions would have no clue; that does not make it poorly defined.
I don't understand what you mean by "mechanical function" - W is neither more nor less mechanical than (say) sin.
Draw a graph of the relation/function y = f(x) = x*(e^x) . Since 32*ln(2) is real and positive, W( 32*ln(2) ) is the x-coordinate of the _only point_ on the graph for which the y-coordinate equals 32*ln(2) .
In general,
W(y) * e^W(y) = y .
@@ThreePointOneFou A simple approach to this problem would be to rewrite the equation as 2^x = 5 - x , then sketch the graphs of f(x) = 2^x and g(x) = (5 - x) into one diagram, and estimate the coordinates of the intersection point of f(x) and g(x) . No Lambert W Function needed. (This approach would also demonstrate clearly that there exists only one real solution.)
I actually think the lambert w function is a legitimate way to solve it, but if you just want a numerical answer, newton’s method would have been a lot faster.
highly interesting. will now be reading about the definition of the W function.
thank you.
I wish all maths problems could be solved by making up a function that solves the problem and then using it to solve the problem.
2^x + x = 5, 2^x = 5-x = y = => x = 5 - y. 32*2^(-y) = y, y*2^y = 32. y*e^(ay) = 32, where a = log(2). (ay)e^(ay) = 32a > 0 = => ay = W0(32a) = => x = 5 - W0(32a)/a.
There is a second branch of W-function, W(-1)(z), for z < 0. W function's branches cannot be expressed in terms of elementary functions.
bro humiliated me (an indian 9th grader) in every single way by saying, "i wasn't able to go to harvard, that's why i went to stanford 0:23 ". btw: thanks for uploading such glorious content, your daily uploads makes my day, everyday.
Tbh they gotta make math questions MORE tricky, not More harder if you know what I'm saying.
this problem isnt actually that hard
it's just a series of intuitive substitions
ive seen harder local math olympiad problems tbh
@@KookyPiranha It's trivial, provided you know what W(x) is. Unless they introduced it before this question, this entrance exam seems more like a mathematics themed trivia quiz.
@@psychopompous489 it's likely this is just a normal problem and they introduced the wx function in the description of the problem
2^x + x - 5 = 0
Substitute -3,-2,-1, 0, 1, 2, 3
to see which values give a negative and positive answer and by how much.
The answer will be a value between the two answers where the sign switches.
In this case x =1 and x=2
Substitute fractions in between to find the answer.
First thing I noticed about the answer is that it is very nearly sqrt(3), which is probably just a coincidence.
Not very nearly actually only up to 1 decimal place.
√3 = 1.732050807568877...
I saw the same approximation, but with (e-1)=1.71828
Probably also a coincidence, but now with logarithms.
1/Sqrt(2)-1
Easy. Just take the derivative of both sides.
(ln2)2^x = -1
2^x = -ln2
x = log_2 (-ln2)
/s
absolutely not.
counterexample:
f(x)=x^x
f'(x)=(1+ln(x))x^x
at x=1/e, f'(x)=0 but f(x)≠0
@Blackpenredpen does a lot of videos (think a whole playlist's worth) re: Lambert W function and explains it rather well... Bonus - he also uses "fish" to explain it! 😂
Alive without breath;
As cold as death;
Never thirsting, ever drinking;
Clad in mail never clinking.
Drowns on dry land,
Thinks an island
Is a mountain;
Thinks a fountain
Is a puff of air.
So sleek, so fair!
What a joy to meet!
*****************
We only wish
To catch a fish,
So juicy-sweet!
Thankyou Presh for explaining it so nicely.
I believe my first comment "disappeared"...
@Presh- Thanks very much.
I'll look into Lambert W
(I did attempt a guess at x=1.7; but it was a guess, and not a solution.
Take good care, Presh.
Thanks again !
The W function is cool. And it lets you carry around an exact form, it’s still approximate when reduced to numbers. It would be nice to include it in BLAS software
never thought that I would dislike a video from this channel, until I watched this one..
There is an imaginary function to un do that. 😊
There's no closed form for W function, so it is as good as just using a numerical method.
I am writing this comment before I watch the video, and will edit it after I watch it. My initial impression from just the thumbnail is... no way would a college entrance exam question involve the Lambert W function, right? Nobody would expect high school kids to know about the Lambert W function, right?
EDIT: ...huh.
Possibly not - but if this were an interview question (rather than a written one), the interviewer could ask something like "imagine that you have a function that is the inverse of x(e^x) - could you solve it then?"
We literally got a question like this in our STEP exam for Cambridge maths, despite having never learnt it in school. It’s about how you well and quickly you are able to understand and apply totally new concepts
It's a fairly well-known tactic for top-level universities. That's why they sell their own math and physics textbooks to prepare students for entrance exams.
@@CodecrafterArtemis You misspelled scam.
Here is a quick way to approximate: It’s easy to argue that there is a single unique solution 1 < x < 2 because at x=1, 2^x + x = 3 and at x=2, it’s 6. Linear interpolation would give x=1.67, but we know the function 2^x + x is convex, so the solution should be a bit higher, so we will round it up and say roughly 1.7.
Ok, but the W remain and it solved like a deus ex machina...
The W is quite a bit like normal logarithms, you usually "solve" them as well by means of the deux ex machina that we call a calculator (except no ordinary calculator has the W function). Side note: I'm 50 with an MSc in applied physics, and I heard of the W function only a few years ago. Definitely never learned about it in school...
in math, you often answer with functions. its same as answering with x = sin (x) or fun(x) = x^2
as long as its actual function that works in that specific general instance, its acceptable answer. since it saves time on writing out the entire page of equations.
would you rather write
X = 5 - w(32ln2)/ln2
or
x = 5 - {ln(x/lnx) - {ln(x/lnx)/[1+ln(x/lnx)]} ln(1-lnlnx/lnx)}(32ln2)/ln2
i
@@Yiryujin the second One. I don't Need elegance if not explained. Moreover in the video Is talked like and operator like sin and cos (without demonstration ok) but you associate It like a substitution (nothing special if you think It would have been the third One in the example)
@@bjorneriksson2404 I never had problema using adanced physical or mathematicians feaurre, still my First time hearing about W -function
@@lucabastianello9830 Actually, the two expressions are NOT equivalent. The second one is an expression representing a lower bound for W in the original solution.
It is an operator - or better, a multi-branched function. Neither more nor less so than the 'normal' logarithm.
it has 2 complex and one real solutions. however, newtons procedure did not find
a result:
10 print "mind your decisions-solving a harvard university entrance question"
20 z=5:sw=z/19:goto 40
30 a=ln(abs(sin(b)/b))/ln(2):dg=exp(a*ln(2))*cos(b):dg=(dg-a-z)/z:return
40 b=-5:gosub 50:goto 100
50 gosub 30
60 b1=b:dg1=dg:b=b+sw:if b>20*z then stop
70 b2=b:gosub 30:if dg1*dg>0 then 60
80 b=(b1+b2)/2:gosub 30:if dg1*dg>0 then b1=b else b2=b
90 if abs(dg)>1E-10 then 80 else return
100 gosub 110:goto 120
110 print "x=";a,"%",b;"*i":return
120 b=b+sw:gosub 50:gosub 110
130 x=-10:print "die reelle lösung ist x=";:goto 150
140 dg=(2^x+x-z)/z:return
150 gosub 140
160 x1=x:dg1=dg:x=x+sw:x=x+sw:x2=x:gosub 140:if dg1*dg>0 then 160
170 x=(x1+x2)/2:gosub 140:if dg1*dg>0 then x1=x else x2=x
180 if abs(dg)>1E-10 then 170
190 print x
mind your decisions-solving a harvard university entrance question
x=-5.0304466 % -3.24091965*i
x=-5.03046368 % 3.04819125*i
die reelle lösung ist x=1.71562073
>
run in bbc basic sdl and hit ctrl tab to copy from the results window
but what does Lambert W function do?
It enables you to solve equations involving a mix of polynomials and exponentials.
I always like to solve these problems iteratively. In this case, start with a guess for x0 between 0 and 5. The next iteration x1 comes from setting 2^x1 +x0 = 5 or x1 = (ln(5-x0))/ln(2). The next iteration gives x2 = (ln(5-x1))/ln(2), and so on. This converges rapidly. If you try it the other way, ie, 2^x0 +x1 = 5 or x1 = 5 - 2^x0, it doesn't converge.
10:45 to me X really isn’t any clearer or better defined than it was at the beginning of this problem smh
Do you think that x in 5^x = 2 is better defined?
(I think it's just that you are not familiar with W - in principle it's no different than any other function)
@@dlevi67 well I liked it better that way…
Joking aside No I’m not familiar with W Lambert function haha
@@GY9944I strongly suggest you try it cuz it can be very fun
@@dlevi67i think you just aren’t familiar with 5^x=2
@@peterpumpkineater6928 Absolutely. One cannot be familiar with the transcendent except in its symbolic form.
An economy university student once taught me to make a graphic instead of trying to solve it mathematical. And you can also try out numbers with decimals to get a good rounded result. It took me 4 attempts to get to 1.8. I tried 1 -> 3, 2 -> 6, 1.5 -> 3.75, 1.8 -> 5.04. 1 was too small and 2 too big. Looking at the results it must between 1.5 and 2, but closer to 2. Hence 1.8 was chosen as the next input. If I continue for more decimals then 1.79 -> 4.9941, 1.791 -> 4.998681, etc. The time to do this with a calculator beats the mathematical solve, which you also have to round up or down.
All of Higher Math's videos are about this base use of the Lambert function😂 What a joke,lol. I doubt it has anything to do with any entrance exam ever!
Lambert function is, imo, just a way to write x=something where you have an expression you can't analitically explicitate.
It may be the way they wanted at that entrance exam. I would've just proceeded by writing it as 2^x = 5-x then plotting y=2x and y=5-x and figure out an approximate value by trials choosing the starting value of x by that graphic.
i doubt any of his videos are real entrance exams questions
It’s easy to see that 1
1+(x-1.5)ln2+x/√8 = 5/√8 =>
x~1.72
Once Presh went to an interview for the job at a Maths institute. The interviewer asked every candidate the same question - "Do you stand for humanity?" Many candidates replied yes and were rejected instantly. A candidate even replied no but was also rejected.
When Presh was asked the same question, he said - "Your question has ambiguity. Does "U" mean the letter U or me as a person? Be clear cause the probability of my replies will change.
Interviewer said - "Should we appoint you as the chairperson of this institute?"😂😂😂
If it was the letter "U" he would have used "Does" instead of "Do".
Hence the interviewer definitely meant "you". (Considering he had the basic language knowledge)
@@vinaykumaryadav7013😂😂
What about the interviewee who responded, “I’d rather sit for humanity. I already got my steps in for today.” ?
@@vinaykumaryadav7013 Actually the interviewer asked: Do "U"s stand for humanity? but in sloppy way of pronunciation. 🤠
@@verkuilb instantly rejected
I don't have an exact solution, but with just a basic calculator and guess and test methodology I got to the approximation of x=1.715 in about 2 minutes.
Lambert was the kind of mathematician who was too embarrassed to admit he could not solve unsolvable equations. Hence he made up one to solve them 😂
To be fair, it has an infinite series approximation the same as sin and cos and nobody calls those fake
Well periodicity does help a lot ;)
@@GDyoutube2022 Log and exp also have infinite series approximations, and they are not periodic in R.
@@dlevi67 to that I'll say that it does help a lot to be single-valued ;)
Another simple but laborious method can be the so called "bifurcation" method. i x =2, 2^x+x=6 if x=1 then 2^x+x=3. Therefore, the value of x must be between 1 and 2. let's take a half of 1+2 which is 1.5. Then solve it and if we take enough iterations we reach the value of 1.76...
Listening to your explanation, I must come to the conclusion that I not only wouldn’t have gotten into Harvard, I don’t even think we share a common language. The more you spoke the less I could comprehend.
Researched too much about tetration and already knew the answer would involve Lambert W function
I used this extremely simple Python Program to get an approximate solution to this.,
import math as m
x = 1
while True:
if m.pow(2,x) + x >= 4.9999 and m.pow(2,x) + x
Simply put value of x to make LHS equal to RHS. If we put 1 we got 3 which is less than 5 then for x=2 we got 6 which is greater than 5 so the answer is between 1 to 2 . If it is Mcqs so easily got it . For accurate answer we have to go for newton raphson method by which we will get the answer 1.71…
I'm glad I stopped trying to solve it after a while on my own. All I know are basic log rules. At some point you just realize there are only so many ways to rewrite the equation and you need some help :P. I have never heard of the Lambert W function before, but it sure was interesting to learn about it, especially with copilot's help. So I assume the lambert W function is in our calculators somewhere? It better be or I have no idea how the harvard students are doing this exam! I assume its all still paper and pencil
It's easier to just do it graphically, no need for fancy functions. I just input y=2^x and y=5-x into a graphing calculator and found that x=1.71562.
They wouldn't let me within a 1000 miles of Harvard, so I don't have to worry about passing their exam. My pocket calculator doesn't have the Lambert W() function, so I guess I'm SOL. Not so fast. In my podunk school they taught me fixed-point iteration and Newton-Raphson iteration for finding real roots of nonlinear functions. We can write x←5-2^x, x←ln(5-x)/ln2, or x←e^ln(5-2^x), and maybe some other forms. A plot will show that a root is around 1.7, and one of the iterative forms should converge, starting with x=1.7. x←f(x) will converge when |f'(x)|
First 2 methods gave me enough precision.
I am ecstatic that I even remembered there WAS a Lambert W function
you could just make up("imagine" since you can't calculate it anyway) another function that works for one of the situations at the beginning
The solution to this reminds me of the Sydney Harris cartoon, "Then a Miracle Occurs..."
One of the best ads for excel of all time
Goal seek in Excel. That is amazing and worth the view.
if x = 1 then 3 = 5
if x = 2 then 6 = 5
1 < x < 2
5 - 3 = 2
6 - 3 = 3
2/3 = 0,6667
Meaning that x is approximately 1,6667
Then using calculator I refined it to 1.71562
My initial approximation was less than 3% off
I solved this using Newton Raphson method. I think that method is more intuitive than using an obscure function.
you can also arrive at an approximate value using the Taylor Series at a=1.5. This simplifies the equation to a polynomial and we all can solve polynomials :3
I used 1.5 as an estimate. Inserting x=1 is too small and x=2 is too large. So the actual answer might be around the middle. The higher order of derivatives you go, the more accurate answer you can get. But just the first derivative also approximates the answer quite well.
Perhaps a more neat form of the solution: log2(W(32*ln(2))/ln(2))
There is no "Harvard University Entrance Exam."
My answer would be "it's a number between 1 and 2. We can use a computer to approximate it." My other answers would be "why do you want this?" and "You know there's no closed form for the inverse to 2^x +x, right?"
But the video shows that there _is_ a closed form - if one uses the W function.
Or what exactly do you _mean_ with a "closed form"?
Ive lost my trust in youtubers. I’d love to say i learned something but now that u didn’t explain the inner workings of the W function I’m going to need to watch another video to learn about that. Thanks
There are no more "inner workings" to it than the definition, which Presh has spent the first half of the video in explaining. What "inner workings" are there to the square root of something?
Why can't you solve this quadratically? As in, ln2^x*x = ln5, x2^x = 5, 2^x = 5/x = 5 - x, 5 = 5x - x^2, x^2 - 5x + 5 = 0. Use the quadratic formula and you get 1.38 and 3.61
Somehow I got into Harvard without having ever heard of the Lambert-W function. Go figure. Thanks, Presh, for the introduction. I'll do some more research into it. 🤓
Use Newton Rhapson method to find the roots of the equation 2^x + x - 5 = 0
I asked my high school teacher what were exponential equations used for: "To graduate high school" he answered
I asked my college teacher the same question: "To graduate high school" he answered
If you end up with (ln(W(32*ln2)) - ln(ln2))/ ln2 that is also correct answer as it is equivalent.
One thing I realized in math is that devision comes befoure multiplication and why is no one talking about it.
Transcendental so, use Newton's method and after a few iterations you're good. Start with x0 = 2
My brain ceased to function the moment I got introduced to U
The best I could aproximately think is that: easilly we see that 1.5
No wonder this is new to me. I was already out of school before this was even being taught! 😮
My intuitive guess was sqrt(3). It turns out to make more sense than the Lambert W-func form even though sqrt(3) is a bit off. Lambert W is just a nice way of putting stuff into place to solve numerically anyways. How is it even considered a solution?
Lambert “don’t know what to do” function