Axel Vogt

5936 Reputation

20 Badges

20 years, 252 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

For me it would be more convenient to write common factors in front,
so would write 1/4 * newMatrix (where newMatrix := 4 * yourMatrix ).

A matter of taste ... but I forgot, how to find the factor, which
would make all the coefficients to live in integers.


Others may prefer to have it with |det| = 1:

  M:=Matrix([[1/4, 1/2], [1/2, 1/4]]);
  v:=LinearAlgebra[Determinant](M);
  newM:= sqrt(1/abs(v))*M; # has |det| = 1

and then one way is

  sqrt(3)*newM;

Under 'some' not so terrible assumptions that means to solve
0 = y*xi^(t+1)+xi^t*(y-1)+(y-s)*xi-1+y-s for xi,
where y,s,t are given.

That neither can hope for a closed form - I would say - nor
does it have a reason for unique solutions (not even in the Reals).

For considering your network as data transformation (what ever
that should mean) it should be enough to see, that it is a function,
"ie assigning unique results to inputs", no?

 

Edited to give the reduction:

I have to upload that: that ugly new board again does not accept
'greather than' etc ... what a mess. Was it ever tested seriously?

 

reference: http://www.mapleprimes.com/questions/89281-Problem-With-Solution-Due-To-RootOf

Writing t = (b+i*d)/(a+i*c) and x = (a+i*c) the equation becomes
y= g/(1+exp(x)) + h/(1+exp(t*x)) and knowing x then gives the i.

Deviding by g, again naming the lhs y and 'pulling out t' (0 < x)
we get y= 1/(1+xi) + s/(1+xi^t), now xi = exp(x) and solve for xi.

y= 1/(1+xi) + s/(1+xi^t);
normal(%):
% * denom(rhs(%)):
0=lhs(%) - rhs(%):
simplify(%, symbolic); # 0 < xi, t real
f:=rhs(%);

t (1 + t) t
f := y + y xi + y xi + y xi - 1 - xi - s - s xi


u:=coeftayl(f,xi=0, 0);
v:=coeftayl(f,xi=0, 1) assuming 0 < t;

u := -1 + y - s
v := y - s

f-u-v*xi: simplify(%, size):
'f = % + v*xi + u'; is(%);

(1 + t) t
f = y xi + xi (y - 1) + v xi + u

true

So one wants a root xi of f.

Download reduction_for_expone.txt

 

I think "deformation" is the magic word you are searching for,

i e a path phi: [0, ... 1] ---> (some space) with phi(0) standing for x^2, phi(1) standing for x^3

(1-t)*x^2 + t*x^3 ?

But that is in no way unique and heavily depends on your "desire" (i e what is meaningful in your working context)

Here one can do it by the Abel-Plana formula as well
(though it is much slower):

Digits:=14;

Sum(ln(x)/((x)^(2)+3*x+2),x=1..infinity);
changevar( x=n+1,%,n): factor(%);
                       infinity
                        -----
                         \         ln(n + 1)
                          )     ---------------
                         /      (n + 3) (n + 2)
                        -----
                        n = 0

f:= n -> ln(n+1)/(n+3)/(n+2);
'Sum(f(n),n=0..infinity)'= 
   'int(f(x),x = 0 .. infinity) + 1/2*f(0)'+
   I*'Int( (f(I*x)-f(-I*x))/(exp(2*Pi*x) - 1), x=0..infinity)';
 %:
 ``=rhs(evalf(%));

  infinity           infinity
   -----            /
    \              |
     )     f(n) =  |          f(x) dx + 1/2 f(0)
    /              |
   -----          /
   n = 0            0

              infinity
             /
            |          f(x I) - f(-I x)
         +  |          ---------------- dx I
            |          exp(2 Pi x) - 1
           /
             0


                                                     -17
             = 0.60178245837480 - 0.20538903175872 10    I
'Obviously' the imaginary is just spurious and can be deleted.
> for i from 1 to 7 do
> if i=2 or i=6 then
>   next
> end if:
> print(i);
> end do:

                                  1

                                  3

                                  4

                                 5

                                  7

Can one define 1 as the identity and then use composition of functions, telling the system that one talks about additive functions (ok, linear, but there seem no scalars in the question) ?

You want to pernute the 3 rows, there are 3! = 6 of them and to that is taking one of them, i.e. a number in [1, ... , 6], and RandomTools:-Generate(integer(range=1...6)) does that

Besides the answers so far: what do you intend, what is your actual desire?

What you want is to expand the expression, not to simplify it.

Also you may try to post your code through an upload and ask for a review,
some times you may get really helpful suggestions for improvements.

(x^3)^(2/3): [%, simplify(%, symbolic)];
eval(%, x=I): evalf(%); 

                              3 (2/3)   2
                           [(x )     , x ]

                 [0.5000000000 - 0.8660254038 I, -1.]

I do not have the link handy (it is in Maple's Application Center I think), but this one
is very good and fast (it is almost as fast as if one would compile it, I once got some
code from him for that test).

The only thing is that those things meanwhile are only available as standard sheets
 

And - of course - I do not mind at all slight typos or grammatical errors (may be that
I would not even discover half of them; I am not aware of tools working in Maple and
typing outside and copying into it is a mess).


  assume(0<A, 0 <=t, 0 < xi, xi < 1); 
  map(getassumptions, [A,t,xi]);

    [{A::RealRange(Open(0), infinity)}, {t::RealRange(0, infinity)}, {xi::RealRange(Open(0), Open(1))}]


  evalc(A*exp(-sqrt(0.1-1)*t));

          A cos(0.9486832981 t) - A sin(0.9486832981 t) I


  evalc(A*exp(-sqrt(xi^2-1)*t));

                        2 1/2                   2 1/2
           A cos((1 - xi )    t) - A sin((1 - xi )    t) I

Be aware that 'evalc' alraedy assumes that variables are Reals, except you
assume something else (highlight that command (with the mouse) and press
F1 key in classical or F2 key in the other interface to see the help).
Here is (roughly) what I mean. It is easy to code it (with some care) and
only for x ~ 1 would need some extra twist (it works in 'any' precision).
And it is reasonable fast and flexible, if one is not willing to use what
Maple already provides.

theNewton:=proc (f,x0,n)
# searches for zero of the function f 
# x0 = initial guess, n = steps
 local x,x_new,fx,i;
 i:= 0; 
 x:= evalf(x0);
 while (true) do 
   fx:= evalf(f(x));
   x_new:= evalf(x-fx/D(f)(x));
   # one should check ^^^^^^^ first for (almost) zero
   if( abs(evalf(x-x_new)) < 1e-14  or n <= i) then
     #                       ^^^^^ or what one needs
     break
   end if;
   x:=x_new;
   i:= i+1;
 end do; 
 print(`steps performed`=i); 
 return x;
end proc; #maplemint(%);

Now use it (with 10 Digits):

### for 0 <= x < 1
  x:=1.0-1e-9; # 
  f0:= y -> y*exp(y) - x;

  someRoot:=theNewton(f0,x/2,20);
  LambertW(x);
  f0(someRoot);

                         steps performed = 5
                       someRoot := 0.5671432900
                             0.5671432900
                                     -9
                               0.1 10


### for 1 <= x < infinity
  x:=1e201;
  f1:= y -> ln(y)+y  - ln(x);

  someRoot:=theNewton(f1,ln(x),20);
  LambertW(x);
  f1(someRoot);

                         steps performed = 2
                       someRoot := 456.6955866
                             456.6955866
                                  0.

In x=1 a short Taylor polynom then is enough, i.e.

.205247033774894651+.361896256634889222*z-.107270323141071853*(z-1)^2

That's all I think (except one wants speed or else).

First you should ASCII for your file names.

And second: if you open that file with an text editor the you can guess it is an html file - it says "Page not found"

First 52 53 54 55 56 57 58 Last Page 54 of 93