Tag Info

New answers tagged

2

You could use Function[{args1, var2, var3}, With[{deg = args1[[1]], knots = args1[[2]]}, code ]] Not the neatest, but it would seem to do the job.


5

The answers by march and John McGee become very slow for larger numbers of iteration, to the extent that I had to abort the calculations when going to 7 or 8 iterations. The reason is that Integrate appears to be trying too many unnecessary simplifications at each level, and these steps proliferate because the integrals are iterated. The following makes ...


5

Here are some possibilities more in line with Mathematica idioms (i.e. that avoid using procedural loops). Option 1 Clear[h] h = Function[{t}, 1 + Integrate[#^2, {x, 0, t}]][x] & ; NestList[h, 1, 3] (* {1, 1 + x, 1 + x + x^2 + x^3/3} *) Option 2 To set the ys in the process: Clear[y, h] h = Function[{t}, 1 + Integrate[#^2, {x, 0, t}]][x] & ; ...


4

I believe that the following code does what you want For[{n = 1, y[0][x_] = 1}, n < 4, n++, y[n][x_] = 1 + Integrate[y[n - 1][t]^2, {t, 0, x}];Print[{n, y[n][t]}]]


0

If anyone was interested in alternative (but not as elegant solution) this is the one I came up with recently (using lists as defined in the above solution). Constant = 5; lists = Table[G[i][[j]], {i, 1, Constant}, {j, 1, 2^i}]; Posi[i_, j_] := Ceiling[j/2] model[1, j_] := lists[[1, j]]; model[i_, j_] := lists[[i, j]] + model[i - 1, Posi[i, j]]; finaltable ...



Top 50 recent answers are included