Axel Vogt

5821 Reputation

20 Badges

20 years, 358 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

With Excel there is 'nothing' to code (just some configuring a sheet for such a query), see its help.

Exporting or processing data is a different thing, in any system I would guess.

And most of the time is spent on retrieving data from the web (you have to look up some Excel sites, but I guess if you feed various sheets in a book they are done non-exclusively).

query_example.zip

Edited: or better and more general one may wish to consider downloader programs like the old 'wget' (have not checked for Google) or similar writing to files, to be processed by what ever.

You have to enforce y(0) = 1, y(1) = 5 and what you want is named "Dirac" in Maple:

restart;
y(n)-3*y(n-1)-4*y(n-2)=delta(n)+2*delta(n-1);
rec:=eval(%, delta=Dirac);
rsolve({rec ,y(0) = 1,y(1) = 5}, y(k));

                                  k      k
                              (-1)    6 4
                            - ----- + ----
                                5      5

PS: I would use "recursion", "rsolve" and "delta function" as tags
PPS: Robert was faster ...

If I read it correctly, then you try to find the points, where a quadric
and cubic intersect in dim = 2.

But you do not even say over what you are working (i.e. where your parameters live).

May be 'Groebner' can help you (see the help pages, difficult to use).

But my feeling is: that is a bit too general, it should heavily depend
on the parameters (and the ring) and as an example: let the quadric be
degenerated to be a line or a constant (or worse think of the cubic).


Perhaps I would try first to reduce the quadric to their normal forms
(char not 2) and transform the cubic to the same coordinates.

Not sure what it means, that the cubic is of pure degree = 3.

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

First 50 51 52 53 54 55 56 Last Page 52 of 92