We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive pseudonymised information about your use of our website. cookie policy and privacy policy.

\(2(2^x- 1) x^2 + (2^{x^2}-2)x = 2^{x+1} -2 \)

Please provide explanation.

 Jul 14, 2018

We need to solve \(2(2^x-1)x^2+(2^{x^2}-2)x-2^{x+1}-2=0\).

Let \(f(x) = 2(2^x-1)x^2+(2^{x^2}-2)x-2^{x+1}-2\).

If you graph f(x) using any method, you find that it only touches x-axis at one point.


Graph link: https://www.desmos.com/calculator/wxie170yvi


We will use Newton-Rhapson to find solutions.

\(f'(x) = 4x(2^x-1)+2x^22^x\ln2+2^{x^2}-2+2x^2(2^{x^2}\ln2)-2^{x+1}\ln2\)

As this is too complicated, I solved it with a program.


Here is the source code in C++:
using namespace std;
double f(double x){
    return 2*(pow(2,x)-1)*x*x+(pow(2,x*x)-2)*x-pow(2,x+1)-2;
double f_prime(double x){
    return 4*x*(pow(2,x)-1)+2*x*x*pow(2,x)*log(2)+pow(2,x*x)-2+2*x*x*(pow(2,x*x))*log(2)-pow(2,x+1)*log(2);
int main(){
    double x = 1.1;
    for (int i=0;i<1000;i++){ //iterate 1000 times
        x -= f(x)/f_prime(x);
    printf("Solution: %100g", x);


Output: Solution: 1.32006

 Jul 15, 2018

13 Online Users