Axel Vogt

5936 Reputation

20 Badges

20 years, 251 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

in general indexed variables may give troubles ...

for the other point take care: similar to Math there is a difference between a polynomial and a polynomial function,
and you want to use 'unapply' as suggested

edited to add: i think you can not do (easily) it for indeterminate values of m and n and work with it

i said 10 - P, not -P ... sometimes a starting value (and not a range) is better ... may be you upload & link to your file and somebody has a suggestion

If I understand you correctly ... how about changing variables?
Say your range is 0 ... 10 and P is your then I would try to look for Q:=10 - P.

it is of type of a sum of 2 integrals, where each becomes infinite but together they give a finte value

indexed variables actually are functions in a mathematical sense (but defined for example on the Naturals):

a: IN -> IR just stands for a real sequence ...

As a procedure you may try:

A:= proc(n)
 option remember;
 if n=1 then return 1 end if;
 if 1 < n then
 procname(n-1) + 1/2^(n-1); # = A(n-1) + 1/2^(n-1) 
 end if;
end proc;

A(3);
                                 7/4
and for solving the recursion (note that a function notation is used):

rsolve({a(n) = a(n-1) - 1/2^(n-1), a(1)=1}, {a});
                                         n
                          {a(n) = 2 (1/2) }

To read more about 'rsolve' check the help (for example in a classical sheet
just highlight that using the mouse and press the F1 key)

As far as I know there is none. And hopefully there never will be one. Get used to it.

I know that some parts are hard to read (too stylish and sometimes complicated
grammar, long sentences or rare vocabulary).

But the following may help: dict.tu-chemnitz.de/

After playing with it (without taking books at hand) the last idea for something like that
was a CauchyPrincipalValue, but give up to leave it to adults ...

Here is a lame way to find the value to be proved:

Int((1/(exp(x)-1)-1/x+1/2*exp(-x))/x,x=0..infinity): 
evalf(%); 
exp(%): identify(%): ln(%): simplify(%): combine(%,ln);
                          -0.91893853320467

                            -1/2 ln(2 Pi)

Doug Meade is right in guessing my mood :-) And as long as you do not write down your results ...
you are supposed to do both, the Math and Maple.

Well:

a) Take paper and pencil. Yes, take it.

b) For (2) write down in *words* what must be satisfied for each component and what that means for 'a'.

c) Write it down as formulae (including the logic).

d) Now translate to Maple: if you are familiar with it - fine. Otherwise try to look it up searching for keywords
and the Intro

e) Start over for (3)

 

well, just try to type it in Maple and use that to look up the help (or the manual) like solve( 0 <= 1 - 4*x, x) ... and care for all operations to result in Reals, not only square roots

what is your paper solution? it has "just" to be translated into Maple's language

why not using an array?

may be the following example helps a bit:

 

Download 102_some_pdf_fitting.mws
View file details

(sorry, not quite clear how the new editor handles attachments)

I had a look at both of your data sets A and B, but had not processed
the task in detail and thoroughly. However I doubt they are Gaussian.

But some thoughts (have not carried them out):

First you can beat them into shape by using Statistics for a rough guess
to find mean and variance (that should allow a better scaling at least
and in case that will give you an initial guess for parameter estimates).

For that you may consider to cut of the tails in dataset B (while tails
are missing for dataset A).

Now observe your model a+b*exp((z-c)^2/(2*d)):

The a actually does not appear in a Gaussian, it is meant to be a level
parameter - for which I bet, you can only guess it from tails (which in
A you do not have, for B I would guess + fix some as a first step).

Say you can shift it to level a=0.

The taking log is a parabola (just use ln and simplify(%,symbolic) to
see that), so doing that for the data should be *roughly* look like
that.

A brute logB:=map( p -> [p[1], -ln(p[2])], B); plots[pointplot](logB);
however shows somewhat different ... (I have not shifted however), it
is U-shaped: either a scaling probelm - or a false model (guess so, as
your data are non-symmetric and skewed ... may be log normal?)

Now an approach would be to to find the parabola first for the log(data)
and in a second step taking that as input to refine to your model.

Probably you will have some mismatch close to your peak. That would
need some (careful!) weightings.
Hope it helps you to proceed.


Edited to add: taking log(data) is usually not a bad idea for pdf's,
even if they follow a different distribution.


 

you can use style sheets (like in a word processor)

through the menu bar use format / styles and select one to change it (a bit nasty to find out which one)
and then you can save it as your own (default) style sheet, say myStyle.

May be better to save the current setting as something like mplStyle (not sure whether you can recover
the original, but guess so)

 

Edited: after reading John Fredsted's answer I guess I missunderstood the question ...

int(pf,x); evalc(Re(%)) assuming (x::real); # since you know the solution is real
% assuming (-1<x , x<1);                    # eliminates the absolute function
plot(%,x=-1..1);                            # correct up to a real constant, but
                                            # here the constant happens to be 0
First 81 82 83 84 85 86 87 Last Page 83 of 93