Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I told Mathematica to do a few calculations as follows:

a = 0;

b = 1;

n = 4;

For[i = 0, i < n, i++,

p = 2*x*b - 2*i*a;

a = b;

b = p]

c = CoefficientList[p, x];

l = Length[c];

m = 0;

For[i = 1, i < l + 1, i++,

r = Abs[Part[c, i]]/Abs[Part[c, l]];

If[r > m, m = r, m]]

lowerbound = -m - 1;

upperbound = m + 1;

iter = 5;

f = Function[k, p /. x -> k];

For[z = lowerbound, z < upperbound, z++,

For[i = 0, i < iter, i++,

t = z - f[z]/(D[f[k], k] /. k -> z);

z = t]

Print[N[t]]]

I think this should be executed in a second. But no, Mathematica would run for minutes and won't stop. Can somebody execute this code too, to check if the problem is with my computer or with the code? If the problem is with the code, what kind of problem is it?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica Mathematica calculates for ages

Tags:

**Physics Forums | Science Articles, Homework Help, Discussion**