### Related

##### compare-cos-diff-phi-ratsimp-sin

v_r:(1-(3/2)*(R/r)+(1...

v_th:(-1+(3/4)*(R/r)+...

P:pr-(h*g*z)-(3/2)*m*...

Calculate

compare(1,1);

Calculate

##### compare-kill

kill(x);

compare(%e^%pi, %pi^%e);

compare(x^2+1,2*x);

Calculate

##### compare-cos-diff-phi-sin

v_r:(1-(3/2)*(R/r)+(1...

v_th:(-1+(3/4)*(R/r)+...

P:pr-(h*g*z)-(3/2)*m*...

Calculate

? compare;

Calculate

##### compare

compare( [1, 2, 3], [...

Calculate

##### compare-cos-diff-phi-sin

v_r:(1-(3/2)*(R/r)+(1...

v_th:(-1+(3/4)*(R/r)+...

P:pr-(h*g*z)-(3/2)*m*...

Calculate

##### compare-cos-diff-phi-sin

v_r:(1-(3/2)*(R/r)+(1...

v_th:(-1+(3/4)*(R/r)+...

P:pr-(h*g*z)-(3/2)*m*...

Calculate

##### compare-cos-diff-sin

v_r:(1-(3/2)*(R/r)+(1...

v_th:(-1+(3/4)*(R/r)+...

P:pr-(h*g*z)-(3/2)*m*...

Calculate

##### compare-cos-diff-phi-sin

v_r:(1-(3/2)*(R/r)+(1...

v_th:(-1+(3/4)*(R/r)+...

P:pr-(h*g*z)-(3/2)*m*...

Calculate

### compare

Run Example
```(%i1)v_r:(1-(3/2)*(R/r)+(1/2)*(R/r)^3)*cos(th);
3
R     3 R
(%o1)                      cos(th) (---- - --- + 1)
3   2 r
2 r
(%i2) v_th:(-1+(3/4)*(R/r)+(1/4)*(R/r)^3)*sin(th);
3
R     3 R
(%o2)                      sin(th) (---- + --- - 1)
3   4 r
4 r
(%i3) P:pr-(h*g*z)-(3/2)*m*(R/r^2)*cos(th);
3 m cos(th) R
(%o3)                    - ------------- - g h z + pr
2
2 r
(%i4) v_phi:0;
(%o4)                                  0
(%i5) f_1:h*(v_r*diff(v_r)+v_th/r)*diff(v_th,r)-(v_th^2/r);
3                     3
3 R    3 R              R     3 R
(%o5) h sin(th) (- ---- - ----) (cos(th) (---- - --- + 1)
4      2               3   2 r
4 r    4 r             2 r
2                            3
3 R     3                      R     3 R
(cos(th) (---- - ---) del(R) - sin(th) (---- - --- + 1) del(th)
3   2 r                       3   2 r
2 r                           2 r
3
R     3 R
sin(th) (---- + --- - 1)
3                        3   4 r
3 R    3 R                      4 r
+ cos(th) (---- - ----) del(r)) + ------------------------)
2      4                       r
2 r    2 r
3
2       R     3 R     2
sin (th) (---- + --- - 1)
3   4 r
4 r
- --------------------------
r
(%i6) f_2:-diff(P,r)+m*((1/r^2)*diff(diff(r^2/v_r,r),r)+(1/(r^2*sin(th))*(diff(sin(th)*diff(v_r,th),th))));
3
3 R    3 R
4 r (---- - ----)
2      4
2                        2 r    2 r
(%o6) m ((------------------------ - -------------------------
3                          3
R     3 R                  R     3 R     2
cos(th) (---- - --- + 1)   cos(th) (---- - --- + 1)
3   2 r                    3   2 r
2 r                        2 r
3                                  3
2  6 R    3 R               2  3 R    3 R  2
r  (---- - ---)           2 r  (---- - ----)
5     3                      2      4
r     r                    2 r    2 r         2
- ------------------------- + -------------------------)/r
3                           3
R     3 R     2             R     3 R     3
cos(th) (---- - --- + 1)    cos(th) (---- - --- + 1)
3   2 r                     3   2 r
2 r                         2 r
3
R     3 R
2 cos(th) (---- - --- + 1)
3   2 r
2 r                3 m cos(th) R
- --------------------------) - -------------
2                      3
r                      r
(%i7) compare(f_1,f_2);
(%o7)                               unknown
(%i8) 1/(r*sin(th))*diff(v_phi,phi);
(%o8)                                  0
(%i9) ```
Run Example
```v_r:(1-(3/2)*(R/r)+(1/2)*(R/r)^3)*cos(th);
3
R     3 R
(%o1)                      cos(th) (---- - --- + 1)
3   2 r
2 r
(%i2) v_th:(-1+(3/4)*(R/r)+(1/4)*(R/r)^3)*sin(th);
3
R     3 R
(%o2)                      sin(th) (---- + --- - 1)
3   4 r
4 r
(%i3) P:pr-(h*g*z)-(3/2)*m*(R/r^2)*cos(th);
3 m cos(th) R
(%o3)                    - ------------- - g h z + pr
2
2 r
(%i4) f_1:h*(v_r*diff(v_r)+v_th/r)*diff(v_th,r)-(v_th^2/r);
3                     3
3 R    3 R              R     3 R
(%o4) h sin(th) (- ---- - ----) (cos(th) (---- - --- + 1)
4      2               3   2 r
4 r    4 r             2 r
2                            3
3 R     3                      R     3 R
(cos(th) (---- - ---) del(R) - sin(th) (---- - --- + 1) del(th)
3   2 r                       3   2 r
2 r                           2 r
3
R     3 R
sin(th) (---- + --- - 1)
3                        3   4 r
3 R    3 R                      4 r
+ cos(th) (---- - ----) del(r)) + ------------------------)
2      4                       r
2 r    2 r
3
2       R     3 R     2
sin (th) (---- + --- - 1)
3   4 r
4 r
- --------------------------
r
(%i5) f_2:-diff(P,r)+h*g+m*((1/r^2)*diff(diff(r^2/v_r,r),r)+(1/(r^2*sin(th))*(diff(sin(th)*diff(v_r,th),th))));
3
3 R    3 R
4 r (---- - ----)
2      4
2                        2 r    2 r
(%o5) m ((------------------------ - -------------------------
3                          3
R     3 R                  R     3 R     2
cos(th) (---- - --- + 1)   cos(th) (---- - --- + 1)
3   2 r                    3   2 r
2 r                        2 r
3                                  3
2  6 R    3 R               2  3 R    3 R  2
r  (---- - ---)           2 r  (---- - ----)
5     3                      2      4
r     r                    2 r    2 r         2
- ------------------------- + -------------------------)/r
3                           3
R     3 R     2             R     3 R     3
cos(th) (---- - --- + 1)    cos(th) (---- - --- + 1)
3   2 r                     3   2 r
2 r                         2 r
3
R     3 R
2 cos(th) (---- - --- + 1)
3   2 r
2 r                3 m cos(th) R
- --------------------------) - ------------- + g h
2                      3
r                      r
(%i6) compare(f_1,f_2);
(%o6)                               unknown
(%i7) ```
Run Example
```v_r:(1-(3/2)*(R/r)+(1/2)*(R/r)^3)*cos(th);
3
R     3 R
(%o1)                      cos(th) (---- - --- + 1)
3   2 r
2 r
(%i2) v_th:(-1+(3/4)*(R/r)+(1/4)*(R/r)^3)*sin(th);
3
R     3 R
(%o2)                      sin(th) (---- + --- - 1)
3   4 r
4 r
(%i3) P:pr-(h*g*z)-(3/2)*m*(R/r^2)*cos(th);
3 m cos(th) R
(%o3)                    - ------------- - g h z + pr
2
2 r
(%i4) v_phi:0;
(%o4)                                  0
(%i5) f_1:h*(v_r*diff(v_r,r)+(v_th/r)*diff(v_r,th)-(v_th^2/r));
3
2       R     3 R     2
sin (th) (---- + --- - 1)
3   4 r
4 r
(%o5) h (- --------------------------
r
3                3
2       R     3 R        R     3 R
sin (th) (---- + --- - 1) (---- - --- + 1)
3   4 r          3   2 r
4 r              2 r
- ------------------------------------------
r
3     3
2      3 R    3 R     R     3 R
+ cos (th) (---- - ----) (---- - --- + 1))
2      4      3   2 r
2 r    2 r    2 r
(%i6) f_2:-diff(P,r)+g*h+m*((1/r^2)*diff(diff(r^2/v_r,r),r)+(1/(r^2*sin(th))*(diff(sin(th)*diff(v_r,th),th))));
3
3 R    3 R
4 r (---- - ----)
2      4
2                        2 r    2 r
(%o6) m ((------------------------ - -------------------------
3                          3
R     3 R                  R     3 R     2
cos(th) (---- - --- + 1)   cos(th) (---- - --- + 1)
3   2 r                    3   2 r
2 r                        2 r
3                                  3
2  6 R    3 R               2  3 R    3 R  2
r  (---- - ---)           2 r  (---- - ----)
5     3                      2      4
r     r                    2 r    2 r         2
- ------------------------- + -------------------------)/r
3                           3
R     3 R     2             R     3 R     3
cos(th) (---- - --- + 1)    cos(th) (---- - --- + 1)
3   2 r                     3   2 r
2 r                         2 r
3
R     3 R
2 cos(th) (---- - --- + 1)
3   2 r
2 r                3 m cos(th) R
- --------------------------) - ------------- + g h
2                      3
r                      r
(%i7) compare(f_1,f_2);
(%o7)                               unknown
(%i8) 1/(r*sin(th))*diff(v_phi,phi);
(%o8)                                  0
(%i9) f_3: h*(v_r*diff(v_th,r)+(v_th/r)*diff(v_th,th)-(v_th*v_r/r));
3
R     3 R     2
cos(th) sin(th) (---- + --- - 1)
3   4 r
4 r
(%o9) h (---------------------------------
r
3                3
R     3 R        R     3 R
cos(th) sin(th) (---- + --- - 1) (---- - --- + 1)
3   4 r          3   2 r
4 r              2 r
- -------------------------------------------------
r
3            3
3 R    3 R     R     3 R
+ cos(th) sin(th) (- ---- - ----) (---- - --- + 1))
4      2      3   2 r
4 r    4 r    2 r
(%i10) f_4: -(1/r)*diff(P,th)+h*g+m*((1/r^2)*diff(r^2*diff(v_th,r),r)+(2/r^2)*diff(v_r,th)+((1/r^2)*diff((1/sin(th))*diff(v_th*sin(th),th),th)));
3                          3
3 R    3 R      2          3 R    3 R
2 r sin(th) (- ---- - ----) + r  sin(th) (---- + ----)
4      2                  5       3
4 r    4 r                  r     2 r
(%o10) m (------------------------------------------------------
2
r
3                            3
R     3 R                    R     3 R
2 sin(th) (---- - --- + 1)   2 sin(th) (---- + --- - 1)
3   2 r                      3   4 r
2 r                          4 r                3 m sin(th) R
- -------------------------- - --------------------------) - -------------
2                            2                       3
r                            r                     2 r
+ g h
(%i11) compare(f_3,f_4);
(%o11)                              unknown
(%i12) ```

Help for Compare