{"version":8,"graph":{"viewport":{"xmin":-2.1134685260986603,"ymin":-1.5249836351794208,"xmax":44.62076644455276,"ymax":30.8582703241382}},"randomSeed":"92bee624a1ef3ae24f5be7072383181a","expressions":{"list":[{"type":"folder","id":"16","title":"Derivation notes","collapsed":true},{"type":"text","id":"2","folderId":"16","text":"Lambert W is the inverse of xe^x;"},{"type":"text","id":"4","folderId":"16","text":"thus, W(a) is the solution for x to xe^x = a;"},{"type":"text","id":"6","folderId":"16","text":"thus, W(a) is the x-root of xe^x - a = 0."},{"type":"text","id":"8","folderId":"16","text":"That is a problem of finding the zero to a function,"},{"type":"text","id":"10","folderId":"16","text":"which can be done with Newton's method."},{"type":"text","id":"12","folderId":"16","text":"W(a) = W(a) - (W(a) e^W(a) - a) / (e^W(a) * (W(a) + 1))"},{"type":"text","id":"14","folderId":"16","text":"where W(a) on the left is a better approximation,"},{"type":"text","id":"19","folderId":"16","text":"and all W(a) on the right are some previous approximation."},{"type":"text","id":"21","folderId":"16","text":"An initial approximation may be found with"},{"type":"text","id":"24","folderId":"16","text":"W(a) ~= ln(a)"},{"type":"expression","id":"35","color":"#6042a6","latex":"a=x"},{"type":"expression","id":"25","color":"#6042a6","latex":"W_{0}=\\ln a"},{"type":"expression","id":"34","color":"#388c46","latex":"W_{1}=W_{0}-\\frac{W_{0}e^{W_{0}}-a}{e^{W_{0}}\\left(W_{0}+1\\right)}"},{"type":"expression","id":"36","color":"#000000","latex":"W_{2}=W_{1}-\\frac{W_{1}e^{W_{1}}-a}{e^{W_{1}}\\left(W_{1}+1\\right)}"},{"type":"expression","id":"37","color":"#c74440","latex":"W_{3}=W_{2}-\\frac{W_{2}e^{W_{2}}-a}{e^{W_{2}}\\left(W_{2}+1\\right)}"},{"type":"text","id":"40","text":"Quantify error by checking how approx-W(a) works as the inverse of xe^x"},{"type":"expression","id":"38","color":"#2d70b3","latex":"\\ln\\left(\\frac{W_{3}e^{W_{3}}}{a}\\right)"}]}}