November 1, 2007

Mathematician’s sense of humour

Posted in Uncategorized at 11:25 am by changisme

Oh man, I can’t believe in MATLAB, there’s actually a pretty() function, see example below, though the "pretty" output is not preserved due to different formatting here, the effort is worthy of compliment.

solve the equation x^3+a*x+1 = 0 for x:s =
[                        1/6*(-108+12*(12*a^3+81)^(1/2))^(1/3)-2*a/
                             (-108+12*(12*a^3+81)^(1/2))^(1/3)]
[ -1/12*(-108+12*(12*a^3+81)^(1/2))^(1/3)+a/
     (-108+12*(12*a^3+81)^(1/2))^(1/3)+1/2*i*3^(1/2)*(1/
     6*(-108+12*(12*a^3+81)^(1/2))^(1/3)+2*a/
     (-108+12*(12*a^3+81)^(1/2))^(1/3))]
[ -1/12*(-108+12*(12*a^3+81)^(1/2))^(1/3)+a/
     (-108+12*(12*a^3+81)^(1/2))^(1/3)-1/2*i*3^(1/2)*(1/
     6*(-108+12*(12*a^3+81)^(1/2))^(1/3)+2*a/
     (-108+12*(12*a^3+81)^(1/2))^(1/3))]Use the pretty function to display s in
a more readable form:pretty(s)
 
s =
            [                        1/3       a                    ]
            [                  1/6 %1    – 2 —–                  ]
            [                                  1/3                  ]
            [                                %1                     ]
            [                                                       ]
            [               1/3     a                 1/2 /         1/3          a  \]
            [- 1/12 %1    + —– + 1/2 i 3    |1/6 %1    + 2 —–|]
            [                       1/3                    |                        1/3|]
            [                   %1                        \                   %1    /]
            [                                                       ]
            [               1/3      a               1/2 /         1/3        a    \]
            [- 1/12 %1    + —– – 1/2 i 3    |1/6 %1    + 2 —–|]
            [                       1/3                   |                       1/3 |]
            [                   %1                       \                   %1    /]

                                 3                           1/2
                           %1 := -108 + 12 (12 a  + 81)

Advertisements

2 Comments »

  1. olee said,

    您还真幽默啊…倒

  2. yifei said,

    来来来 欢迎去我那讨论一个关于 元朝的问题  求帮助


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: