Axel Vogt

5821 Reputation

20 Badges

20 years, 227 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

I would like to hear about a Math answer as well ... ggogled for 0,1 matrix but nothinh illuminating.

BTW: the following slight modification in Joe Riel's code is faster (but I lost patients for n=6)

#        eigs := LinearAlgebra:-Eigenvalues(evalf(A));
#        if andmap(`>`, eigs, 0) then
         if LinearAlgebra:-IsDefinite(A) then # = positive definite

plot3d( 'dphidx'(x,y,10,5,1/10), x= 0..1, y=0..1, axes=boxed);

tastes like some coding error - ?

Even if it might be done: why should it be done?

Why not simply provide to routines, say procList and procSymbol ...

In that case the user sees what to use as input

Seems it works a bit odd, but the following works for me in M12
(and it might be, that the integral is returned, if the desired
accuracy can not be achieved - then fdiff has no chance ...):

Digits:=14;
Tproc :=proc (t, k, b) 
 Int((1-(1-exp(-k*(t-s)))^b)*(1-exp(-160*s^2)), s = 0 .. 0.15, method = _d01ajc);  
 evalf[14](%);
end proc;
fdiff(Tproc, [2], [2, 10, 2.5]);
                                            -8
                        -0.22665670000000 10



If you mean how to do that in Maple, then you just provide numbers

Ei(1,3); 
evalf(%);
                            0.01304838109

You also may want to have a look at the manuals, at least to
get some ideas how to use Maple,

http://www.maplesoft.com/documentation_center/

If you mean, how this function is done numerically, then it is a
longer story and you would have to take some books about the
numerical evluation of 'Special Functions'.

The link to Wikipedia shows some references for that.

What do you mean by 'normally' ? You have

(m/2*(diff(x, t))^2-exp(x));
int(%,t);
Int( exp(t*%), x);
%=value(%);

                /
               |        2                      2
               |  exp(-t  exp(x)) dx = -Ei(1, t  exp(x))
               |
              /

For that function or other questions look up the help first, ?Ei.

Or a bit more at http://en.wikipedia.org/wiki/Exponential_integral

I stay off from Maple as publishing tool, using it in classical mode and probably would supply something extra for legends after plotting if needed.

But for my case & needs the following would do

plot(x^2, labels=["", y]);
y= SaO^2*`% `;
y=(SaO^2)[`% `];

Based on the given links and inputs at least I understand some parts.

For cos one basically one can use the Chebyshev polynomials, having the desired zeros (see for example stuff about integration methods and the needed nodes). Factoring them reduces to find an according factor (done numerically, may be interval arithmetics and 'shake' is more sound - but hairy to use and it would be more easy to increase working precision in case of troubles).

To special things have to obeyed:
 
In very low degree or special situations Maple spits out rationals or radicals ( cos(Pi/3), cos(Pi/4), ...), hence one needs to find the minimal polynomial of an algebraic number given as radical. Astonishingly I did not find usable codes for that and thus use ways provided by Maple. But I do not like PolynomialTools[MinimalPolynomial] (try it for sin(1) to understand why), instead gfun:-algfuntoalgeq seems more convenient.

The other thing is: for rationals beyond +-1 an automatical simplification invents signs to the original expression and this motivated me to write the code for linear expressions of the original task (ok, I also wanted to do some exercise in handling simple functional coding, since else I always omit it).

What I dislike: factorization is used ...

 

For the sinus there is a way to use the resultant. But that may introduce reducible solutions and one again would have to find and select factors. Instead enforce a conversion to the cosinus, which Maple would not be willing to choose. After that and embedding the core solution in a similar manner as above one can fall back to the solution that we already have.

 

trig_minimal_polynom.mws
trig_minimal_polynom.pdf

exporting as mpl code shows me your code (see below)
and it works

printlevel := 2;
for i to 3 do for j to 3 do i*j end do end do;
NULL;

1. enter as text, so one can copy

2. a = 0 or not ?

3. ?allvalues

restart; interface(version);

  Classic Worksheet Interface, Maple 12.02, Windows, Dec 10 2008 Build ID 377066
(a+b)*(a-b); 
simplify(%);
                                2    2
                               a  - b
May be one of the sad side effects of 2D input in the standard sheets encouraging
users for sloppy inputs?
'diff(Int(f(u),u=0..x), x)': '%'=%;

                          /   x        \
                          |  /         |
                       d  | |          |
                       -- | |   f(u) du| = f(x)
                       dx | |          |
                          |/           |
                          \  0         /

But 1/sqrt(x) ---> +oo, so f(x) = cos( 1/sqrt(x) )^2 takes any value in [0, ..., 1]
0=(-t)^5 - ((t^2+t+1)/(-t)); {solve(%, t)}; R1:=evalf(%);
0=(-t)^5 + ((t^2+t+1)/(-t)); {solve(%, t)}; R2:=evalf(%);
plots[complexplot](R1 union R2, style=point, symbolsize=20);
First 43 44 45 46 47 48 49 Last Page 45 of 92