Axel Vogt

5936 Reputation

20 Badges

20 years, 252 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

How about using a function of 1 variable?

ini:=g(1) = -(1+a*r)*exp(-a*r)/a^2;
rec:=g(N) = N*g(N-1)/a-r^N*exp(-a*r)/a;
rsolve({rec, ini}, {g});

                                N
                           (1/a)  GAMMA(N + 1, a r)
                 {g(N) = - ------------------------}
                                      a

Using Google shows a lot, and especially points to Rusin's pages for an overview. 

You want some factorization C.Transpose(C) = A for a given matrix A.

Your matrix is symmetric, thus admits a base of Eigenvectors, which
gives a diagonal matrix delta. Taking the square root is easy and
gives the desired C, after combining all that.

Find a sheet attached.

PS: please do not post questions through pdf files - usually nobody
wants to type that in again. The best is: provide as ASCII text.

Cholesky_factorizati.mws

plot('zvel'(T), T = 0.0 .. 0.15*10^(-5))
PS: seems you translated something like integration (or similar)
from C++. If so: Maple provides tools to write that down directly.
frac(2.5);
                                 0.5

Something similar in Matlab should work as well and is certainly faster.

The following almost works and explains a bit:

  dsolve(deqs):
  convert(%, list): # to have a fixed ordering
  Sol:=simplify(%, size):

Now determine the lengthy solutions

  map(lhs, Sol);

                         [N(y), u1(y), u2(y)]

  N:= unapply(rhs(Sol[1]), y):
  u1:= unapply(rhs(Sol[2]), y):
  u2:= unapply(rhs(Sol[3]), y):

Observe that the solution depends on 6 parameters _C

  indets(Sol, symbol);

  {GR, K, M, _C1, _C2, _C3, _C4, _C5, _C6,
    b, c1, c2, c3, c4, h, k1, m, rho, y}

But you have 7 equations as 'boundary conditions' and
it neither clear that it has a solution at all nor that
they are 'simple' enough for Maple to find them. And I
guess Maple hangs at least for that.

  bcs:
  BCS:=convert(%, list): nops(%);

                                  7

Looking at BCS it seems the conditions are algebraic,
so you may try 'Groebner basis' (I am not used to it
that much to give it a shot).

But the sense of a possible answer may heavily depend
on your parameters (as square roots are involved it may
result in non-real solutions).

In Maple 12 (or up to that?) I always have the issue with the 'Standard', that output is in Italics = cursive (terrible to read), using Maple 12 on WIN XP SP2.

And failed to deactivate for the output (but have to set all to Italic, and after that all to non-italic). After saving and re-opening all was lost and reset.

Is that solved in Maple 14?

Digits:=14;

diff(q^2*l(a, q)^(1/2)*((1-l(a, q))/(1.1))^(1/2)+
(1-a)*(1-q*l(a, q)^(1/2))*q*((1-l(a, q))/(1.1))^(1/2)+
a*(1-q*((1-l(a, q))/(1.1))^(1/2))*q*l(a, q)^(1/2), a);
identify(%): convert(%, D):
simplify(%, size):
A:=%;

writes your expression in symbolics and you want

0 = Int(A, q=0..1) to be solved for the a, where l is
the lengthy expression RootOf(...)^2, call that L.

I think your a is positive (except you expect complex
solutions).

First: since you have a square the square root will vanish
in A, I think, and may be simplified a bit. Are there
some symmetries as well?

Second: L is not an analytic function, it stand for the
4 roots of a equation of degree. Thus I would guess that
you have to consider all the 4 cases.

And finally: that certainly should feed as numerical task
to Maple, 'solve' will have no chance.


Perhaps the best what you may do: go one step back *before*
you have used Maple for the posted question.

And consider/post that - is it a kind of integral equation?

Anyway, I hope it helps.

Let us look at a simple example:

  Int(exp(-x^2), x=0..t):
  '%'=value(%);
                    t
                   /
                  |         2             1/2
                  |   exp(-x ) dx = 1/2 Pi    erf(t)
                  |
                 /
                   0

What do you want for this?

  '(a-b*delta)*(c-delta)*1/sigma/sqrt(2*Pi)*exp(-(delta-mu)^2/2/sigma^2)';
  Int(%, delta=0 .. a/b);
  value(%);
  simplify(%, size);
  collect(%, erf);

gives a result, almost readable.

Note that you can not avoid erf: the factors in front of exp stand for
some quadratic expression, having all terms, and your exp is Gaussian
pdf (with mean and standard deviation).

So you compute some linear combination of the cdf, mean and its variance,
but over a finite range.

Do not panic because of erf, Maple will handle it.

For numerical values it may be, that you will have to use 2 - 3 times
of the digits for your desired result, since you *may* have terms,
which are quite close in magnitude and you take differences of them.

But just try Digits:=14 first with your actual data.

And I directly suggest: do not use 2D input if starting with Maple.
It is a trap for beginners.

Being not an expert: it is a mixture, in parts it reads like 'Basic', but it is fairly deeper and a good part is coded in compiled C as well.

But you should not care for that for a long time, just get used to use it.

BTW: the 'Classical Interface' is far moer save and easy for starters (and would avoid frustrating handling errors), though it does not look that nice. You may consider to switch later for the Java interface for finer layouts.

look up, %, that might be what you are looking for

That LN:= ln@abs is an anti-derivative in the real (!) case

  diff(g(x),x); eval(%, g=Ln);
  convert(%, piecewise); # that assumes x to be real

                     { undefined          x = 0
                     {
                     {    1/x           otherwise

but that is not a solution for complex variables, not even in
the right half plane (which would avoid branch cuts):

Define the real and imaginary parts of a function f: IR^2 ---> IR^2

  f(x+I*y);
  #eval(%, f=exp);     # a good example
  #eval(%, f=abs);     # to see, that abs is not good
  #eval(%, f=ln@abs);  # for the case discussed here
  u:=unapply(evalc(Re(%)), x,y);
  v:=unapply(evalc(Im(%%)), x,y);

Then the Cauchy Riemann DE say: f is analytic iff the following holds:

  ['D[1](u)(x,y) = D[2](v)(x,y)', 'D[2](u)(x,y) = -D[1](v)(x,y)'];
  evalc(%);

Now activate the discussed case and you get

                          x            y
                      [------- = 0, ------- = 0]
                        2    2       2    2
                       x  + y       x  + y

On the other hand 'one knows', that 1/z has an anti-derivative in
the analytic functions and it is ln, so there no 'choice', if one
wants to cover that (I am unprecise and vague here).

Note that most of integration only holds in the complex case, if the
functions are complex analytic (and not only harmonic) while taking
the univariate case (what usually is understood by Maple).

For example M would tell, that D(LN)(z) has no meaning, if taken
in a non-real point z:

  diff(Ln(z),z); eval(%, z=x+I*y); evalc(%);
  subs(x=0, y=1, %);
  eval(%);
                              abs(1, z)
                              ---------
                                | z |

                              abs(1, I)

  Error, (in simpl/abs) abs is not differentiable at non-real arguments


But it is only a rephrasing, what is meant in the link given by acer:
ln@abs is false, if working beyond the Reals. Which Maple is designed for.
'limit( x/sqrt(1-cos(x)), x=0,right)': '%'=%;
                                   x            1/2
                     lim    ---------------- = 2
                   x -> 0+  sqrt(1 - cos(x))

'limit( x/sqrt(1-cos(x)), x=0,left)': '%'=%;

                                  x             1/2
                    lim    ---------------- = -2
                  x -> 0-  sqrt(1 - cos(x))

Also never hesitate to plot your task in case of doubts and troubles:

plot( x/sqrt(1-cos(x)), x=-0.1 .. 0.1);

plot( x/sqrt(1-cos(x)), x=-0.1 .. 0.1)

I probably would use xj.
Else `xi ` (with a blank!).
First 51 52 53 54 55 56 57 Last Page 53 of 93