Jump to content

solve the following mathematical problem either mathematically or using an algorithm

Featured Replies

How often do you have to perform this operation to get a specific x?

 

once

<script>
var equation= "(x²-1)² / (4*x*(x²+a*x+1))";
var a=0;
var b=10;
while(a<b)
{
var equation = equation.replace("x", "(x²-1)² / (4*x*(x²+a*x+1))");
a=a+1;
}
document.write(equation);
</script>

Where b is the specific new_x you are looking for so for new_x=10

 

(((((((((((x²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))

 

where x=9 if I was being less lazy I could calculate it as well

Edited by fiveworlds

You can run it yourself in a .html file just copy and paste it into notepad. Of course over 100000 is kinda slow on my computer so there are some limitations to it. If I was to have it calculated I would run the above script as php and then use that to generate the javascript code to give me an answer.

The original problem has been deleted so I can't comment on that. But ...

 

I would run the above script as php and then use that to generate the javascript code to give me an answer.

 

Why use PHP to generate Javascript? The PHP can generate whatever output the Javascript was going to.

 

Unless the deleted problem asked for a Javascript solution?

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.