Question: How do I show an expression in terms of other expressions?

Please excuse me if this question is too basic or has been answered before, though I've spent a couple of hours searching for similar questions without any luck.

I have the following expression, which is given in terms of other expressions:

Maple then rewrites f as a function of x,y,z,etc. But my problem comes in when I, say, differentiate df/dx, I get a horrible long solution in terms of x,y,z (see below). Is there any way to neaten up this expression by rewriting it in terms of r1,r2,d1???

 

Thanks in advance to anyone who can help me out.

Bryan

 

> dfx := diff(f, x);
print(`output redirected...`); # input placeholder
        ///                    2 x - 2 x1                     
        |||---------------------------------------------------
        |||                                              (1/2)
        |||  / 2              2    2              2    2\     
        ||\2 \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     
        \\                                                    

                                 2 x - 2 x2                     \/
           + ---------------------------------------------------| /
                                                           (1/2)| |
               / 2              2    2              2    2\     | \
             2 \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     /  

                                                      (1/2)
          / 2              2    2              2    2\     
          \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     

                                                         (1/2)
             / 2              2    2              2    2\     
           + \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     

                                                                 //
                                                        (1/2)\   ||
             /  2               2     2               2\     |   |\
           - \x2  - 2 x2 x1 + x1  + y2  - 2 y2 y1 + y1 /     / - |
                                                                 |
                                                                 \

                                                      (1/2)
          / 2              2    2              2    2\     
          \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     

                                                         (1/2)
             / 2              2    2              2    2\     
           + \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     

                                                        (1/2)\  
             /  2               2     2               2\     | /
           + \x2  - 2 x2 x1 + x1  + y2  - 2 y2 y1 + y1 /     / |
                                                               |
                                                               |
                                                               \

                              2 x - 2 x1                     
          ---------------------------------------------------
                                                        (1/2)
            / 2              2    2              2    2\     
          2 \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     

                                                                 \/  
                                 2 x - 2 x2                     \| //
           + ---------------------------------------------------|| ||
                                                           (1/2)|| \\
               / 2              2    2              2    2\     ||   
             2 \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     //   

                                                      (1/2)
          / 2              2    2              2    2\     
          \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     

                                                         (1/2)
             / 2              2    2              2    2\     
           + \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     

                                                                 \  
                                                        (1/2)\  \| /
             /  2               2     2               2\     |  || |
           - \x2  - 2 x2 x1 + x1  + y2  - 2 y2 y1 + y1 /     /^2/| \
                                                                 |  
                                                                 /  

                                                      (1/2)
          / 2              2    2              2    2\     
          \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     

                                                         (1/2)
             / 2              2    2              2    2\     
           + \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     

                                                              \/
                                                        (1/2)\| /
             /  2               2     2               2\     || |
           - \x2  - 2 x2 x1 + x1  + y2  - 2 y2 y1 + y1 /     /| \
                                                              |  
                                                              /  

                                                      (1/2)
          / 2              2    2              2    2\     
          \x  - 2 x x1 + x1  + y  - 2 y y1 + y1  + z /     

                                                         (1/2)
             / 2              2    2              2    2\     
           + \x  - 2 x x2 + x2  + y  - 2 y y2 + y2  + z /     

                                                        (1/2)\
             /  2               2     2               2\     |
           + \x2  - 2 x2 x1 + x1  + y2  - 2 y2 y1 + y1 /     /

Please Wait...