hx <- function(x){
abs(16*x*exp(1)^(-4*x) - 0.55)
}
roots_gx <- optimize(hx, lower = 0, upper = 2)$minimum
roots_gx
One of the roots of g(x) is 0.78, struggling to find the other one
tried this code:
roots_gx <- optimize(hx, lower = 0, upper = 2)$minimum
roots_gx
I was expecting two answers only got one
First graph the function and use the appropriate intervals to obtain the solutions:
Now we could obtain the two solutions:
But this is a well defined function. Use the lambertW function with its 2 branches to obtain the two solutions:
These solutions are the true solutions as compared to the optimization above