0
$\begingroup$

I am trying to apply an "operation" on polynomial functions: apply the operator $(\frac{\partial f}{\partial x}-y\frac{\partial f}{\partial z})^2+(\frac{\partial f}{\partial y}+x\frac{\partial f}{\partial z})^2 $ to functions and then take the square root of it. But after certain rounds of operations, because of the square root, the denominators became really complicated and the computer basically chocked. Is there any good way that I could solve the problem or I just have to switch to different programming software like Matlab ?

A small example:

xleft := Function[{f}, D[f, x] - y*D[f, z]/2];

yleft := Function[{f}, D[f, y] + x*D[f, z]/2];

lapl := Function[{f}, xleft[xleft[f]] + yleft[yleft[f]]]

laplsquaroot := Function[{f}, Sqrt[lapl[f]]]

When I used the Nest function here, Nest[laplsquaroot, x^9 + y^6 + z^12, n], when n became larger than 5 the computer got chocked...

Any suggestion ??

$\endgroup$
5
  • 3
    $\begingroup$ The LeafCount of your test function increases with every step by a factor of about 140. For n=4 it is already 8,308,058. What else then a huge slowdown in the next steps were you expecting? $\endgroup$ Jan 26, 2015 at 21:22
  • $\begingroup$ Do you have any suggestions ? I was thinking I could Fourier transform or ... $\endgroup$
    – starry1990
    Jan 26, 2015 at 21:23
  • $\begingroup$ How exactly would MATlab help in this case? $\endgroup$
    – Mr.Wizard
    Jan 26, 2015 at 21:24
  • $\begingroup$ One more result: For n=5, LeafCount is 1,603,393,231 $\endgroup$ Jan 26, 2015 at 21:30
  • 1
    $\begingroup$ Using Simplify at every step reduces LeafCount considerably (so it is possible to reach higher values of n than without it). But it is slow as well. $\endgroup$ Jan 26, 2015 at 21:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.