Axel Vogt

5936 Reputation

20 Badges

20 years, 252 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

invfourier(S,w,t); convert(%, Int); shows the integral and writing
Heaviside as a piecewise function you end up with the following

  Int(1/2*1/Pi*exp(-9/640000000*I*w)/w^2,w = -infinity .. 0);

which does not exist (in 0 it is like int(1/w^2) ).

StripTrailingZeroes:=proc(x) # a real float, 0 < x
 local n,xi, M,E, str_M, str_mu,mu,k,eta;
 
 if not( type(x, float) ) then return 'x' end if;
 
 if x=0 then return 0. end if;
 if x < 0 then return -procname(-x) end if;
 
 M,E:= SFloatMantissa(x),SFloatExponent(x);
 
 str_M:=convert(M, string);
 StringTools:-SubstituteAll(%, "0", " ");
 StringTools:-TrimRight(%);
 str_mu:=StringTools:-SubstituteAll(%, " ", "0");
 mu:=parse(%);
 
 k:=length(str_M)-length(str_mu);
 SFloat(mu,E+k);
end proc;

Example (for which the other proc has problems):

 Digits:=15;
 evalf[5](Pi)*1e-101 +0; 
 x:=-evalf(%/1.0);
 StripTrailingZeroes(x);
                                              -100
                    x := -0.314160000000000 10

                                      -100
                           -0.31416 10

This can be used for expressions as well:

 z := .314160000000000e100*exp(t)-.300000000000000e-100*I;
 subsindets(z,float,StripTrailingZeroes);

                            100                              -100
   z := 0.314160000000000 10    exp(t) - 0.300000000000000 10     I

                           100                -100
                 0.31416 10    exp(t) - 0.3 10     I



 exp(1)*randpoly(t, terms = 3); #evalf[5](%)*10^(Digits);
 evalf[5](%)*10^(-2); 
 z:=%/1.0;
 subsindets(z,float,StripTrailingZeroes);
                          4                     2
  z := -1.30480000000000 t  + 1.44070000000000 t  - 0.761120000000000 t

                           4           2
                  -1.3048 t  + 1.4407 t  - 0.76112 t



 taylor(exp(3*t), t); evalf(%);
 subsindets(%,float,StripTrailingZeroes);
 
                                2                     3
  1. + 3. t + 4.50000000000000 t  + 4.50000000000000 t  +
                          4                     5      6
        3.37500000000000 t  + 2.02500000000000 t  + O(t )


                       2        3          4          5      6
      1. + 3. t + 4.5 t  + 4.5 t  + 3.375 t  + 2.025 t  + O(t )

cosh(z) = 1/2*exp(z)+1/2*exp(-z) which may cause overflow/underflow.

For large arguments the 2nd term contributes almost nothing and if one
wants a small relative error (say working with 14 Digits) one can do:

  Digits:=floor(evalhf(Digits));
                             Digits := 14


  1 - ln(exp(z)/2) / ln(cosh(z)) = HFloat(1,- Digits); 
  fsolve(%, z=10);

                           14.794944520857

Now using rationals instead of floats is what I often prefer

  a:=14.9165/9.81;
  a:=convert(%, rational);

  zx := '2000 - a*ln(cosh(60*x/a))'; evalf(%);

and switching from cosh to exp does it as follows:

  2000 - a*ln(exp(60*x/a)/2);  # instead of cosh 
  zzx:=simplify(%) assuming 0 < x; evalf(%);

  f:= x -> piecewise( x < 14.79, zx, zzx);

  plot( f(x), x=0 ..38);

In mild words I find it astonishing that a company with more than 100 employees including technicians, support admins and a marketing section is not able to organize the current situation (nor able to make decisions).

I could not imagine that our admin would behave like that and is really easy to ask stuff to check the site for 4 hours and then handing over.

Otherwise said: quite a strange culture, at least for me.

Cheers

admin, how about cleaning up the board from spam now and then ...

Not sure whether I posted it already (Maple 12):

  A:=argument(exp(phi*I))+argument(1/exp(I*phi));
  B:=simplify(%);
  eval(B, phi=Pi);
                                 2 Pi
  evalc(B);
                                  0

  evalc(A);
  eval(%, phi=Pi);

                  phi + arctan(-sin(phi), cos(phi))

                                 2 Pi

... just do not use it (guess it is thought for spam only)

Thank you! That problem seems minor, I will care for it later:

  argument(exp(phi*I))=-argument(exp(-I*phi)); eval(%, phi=-Pi);
  map('t -> &discretemod(t, 2*Pi)', %);
  is(%);
                               Pi = -Pi
                              1/2 = 1/2
                                 true

I think you mean "assume(t < 0)"

It silently assumes the integral exists for any (large) s.

guess you need assumptions (like Reals, not zero), here is a lame version
K^(p-1)*L^(-p+1)=(K/L)^(p-1);
lhs(%)/rhs(%); simplify(%, symbolic);
                                  1

You can consider it as set (but you may use sorting):

  A:=<1,2,3,2,4,1,6,3,2,0,0>; # a column Vector
  convert(A, set);            # duplicates will vanish 
  convert(%, list);           # now back to Vectors
  convert(%, Vector[row]);    # I prefer row Vector here
 
                          [0, 1, 2, 3, 4, 6]

I do not quite agree, that one should not impose some effort to new posters.

Maple just makes it too easy:

- no variable question to be answered when typing in an registration
- no individual, additional reply needed for confirming the first account details

And may be the 1st post is going to be 'reviewed' if situations become worse.

I know semi-commercial sites which do *not* accept 'anonymous' domains
such as hotmail, yahoo, gmail etc. Not a bad idea.

 

But one can not avoid such shit completely, sigh.

convert(X4, rational);
simplify(%): expand(%): 
X4:=simplify(%, size);

This shows, that s1, s2 can not be taken arbitrary small because of log

plot3d( X4, s1= - 200 .. -1, s2= -500 .. -1, axes=boxed);

gives an impression and looking at (0,0) lets one guess a singularity:

limit(X4, s1=0); expand(%);
limit(%, s2=0, left);
                               infinity

Moreover the plot suggests a minimum for s1=0 and s2 in -100 ... -10:

eval(X4, s1=0);
diff(%, s2):
fsolve(%=0, s2= -100 .. -10);

                           -42.903624799046

You also may look up Wikipedia:

en.wikipedia.org/ ("Solution in terms of Chebyshev radicals" towards the end)
and en.wikipedia.org/wiki/Chebyshev_cube_root
 

Let be z = 1. Then you have 6 values to satisfy 1= (z^6)^(1/6), the 6 unit roots.

If you want to ignore subtilities:

(z^6)^(1/6);
simplify(%, symbolic);
                                  z
First 58 59 60 61 62 63 64 Last Page 60 of 93