Quotes help make search much faster. Example: "Practice Makes Perfect"

Monday, January 7, 2013

Math Problems: (x^2−17*x+71)^(x^2−34*x+240)=1


Question:

What is the sum of all integer solutions to the following equation?

(x^2−17*x+71)^(x^2−34*x+240)=1

Answer: 49

Solved using the script below resulting in 7, 8, 10 and 24 as possible integer solutions for the equation


function func1(x){
return (Math.pow(x,2)-(17*x)+71);
}

function func2(x){
return (Math.pow(x,2)-(34*x)+240);
}

console.log("**************************************");
var max=10000000;
for(var a=-max; a<=max; a++){
var temp1 = func1(a);
var temp2 = func2(a);
if(temp1==1 || temp2==0 || (temp1==-1 && temp2%2==0)){
console.log("a: "+a+" temp1: "+temp1+" temp2: "+temp2);
}
}

1 comment:

  1. Please take down this post

    -Calvin Lin
    Brilliant Mathematics Challenge Master

    ReplyDelete


This is an example of scrolling text using Javascript.

Popular Posts