Axel Vogt

5936 Reputation

20 Badges

20 years, 259 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

Let us assume, that Maple know the (numerical) answer for all your inputs, which are 3 variables.
Something like x + y + z evaluated in specific points.

What do you want to see as picture for that case?

Of course one can invert u[j](xi) = eta before doing anything else.
But for eta = u[3](xi) = xi+sin(xi) one certainly needs a selection.

For i=2, j=1 the integral does not exist (as already said):
Int(-1/2*exp(-abs(-x+mu)/sigma*2^(1/2))/sigma*2^(1/2)*exp(-alpha*x),
  x = -infinity .. infinity)  

however

Int(-1/2*exp(-abs(-x+mu)/sigma*2^(1/2))/sigma*2^(1/2)*
  exp(-alpha*abs(x)), x = -infinity .. infinity);
value(%) assuming 0 < alpha;
convert(%, piecewise, mu);
expand(%): combine(%, exp): simplify(%, size);

would work.

For i=3, j=1 one can (up to factors) reduce to find

Int(x^((mu-sigma)*(mu+sigma)/sigma^2)*
  exp(-x*(mu+alpha*sigma^2)/sigma^2), x = 0 .. infinity)

and for that one also needs to assume something

Though his handling is essentially ok (his first postings!) I have
doubts in the Math, it is not complete, much to mechanic. Which is
not a shame at all: if a CAS like Maple refuses answers that also
may help to stumble to complete the task (sometimes I even use it
just that way ...).
Of course one can invert u[j](xi) = eta before doing anything else.
But for eta = u[3](xi) = xi+sin(xi) one certainly needs a selection.

For i=2, j=1 the integral does not exist (as already said):
Int(-1/2*exp(-abs(-x+mu)/sigma*2^(1/2))/sigma*2^(1/2)*exp(-alpha*x),
  x = -infinity .. infinity)  

however

Int(-1/2*exp(-abs(-x+mu)/sigma*2^(1/2))/sigma*2^(1/2)*
  exp(-alpha*abs(x)), x = -infinity .. infinity);
value(%) assuming 0 < alpha;
convert(%, piecewise, mu);
expand(%): combine(%, exp): simplify(%, size);

would work.

For i=3, j=1 one can (up to factors) reduce to find

Int(x^((mu-sigma)*(mu+sigma)/sigma^2)*
  exp(-x*(mu+alpha*sigma^2)/sigma^2), x = 0 .. infinity)

and for that one also needs to assume something

Though his handling is essentially ok (his first postings!) I have
doubts in the Math, it is not complete, much to mechanic. Which is
not a shame at all: if a CAS like Maple refuses answers that also
may help to stumble to complete the task (sometimes I even use it
just that way ...).
I would write u[2]:= x -> piecewise(phi = 1,ln(x),x^(1-phi)/(1-phi))
and actually would avoid indexed variables, u(2) etc is ok as well.

I did not go through the whole stuff, but only 1 example

# Set up the equation(s), use Upper Case Int, not int
# Do not use x, but any other symbol: if the integral can not be solved explicitely
# then you get an error message if trying to solve for x
u[j](xi) = Int(f[i](x)*u[j](x), x = -infinity .. infinity);
 
# in case you are outside the loops
subs(i=1, j=2, %); eval(%);  
 
# evaluate the integral
value(%): simplify(%, size):
 
# Note that solve may return a list or RootOf, not a single value - and it may use
# expensive symbolics - a lame alternative is 'isolate'
isolate(%, xi):
  
# clean up the lengthy result
simplify(%): simplify(%, size);
I would write u[2]:= x -> piecewise(phi = 1,ln(x),x^(1-phi)/(1-phi))
and actually would avoid indexed variables, u(2) etc is ok as well.

I did not go through the whole stuff, but only 1 example

# Set up the equation(s), use Upper Case Int, not int
# Do not use x, but any other symbol: if the integral can not be solved explicitely
# then you get an error message if trying to solve for x
u[j](xi) = Int(f[i](x)*u[j](x), x = -infinity .. infinity);
 
# in case you are outside the loops
subs(i=1, j=2, %); eval(%);  
 
# evaluate the integral
value(%): simplify(%, size):
 
# Note that solve may return a list or RootOf, not a single value - and it may use
# expensive symbolics - a lame alternative is 'isolate'
isolate(%, xi):
  
# clean up the lengthy result
simplify(%): simplify(%, size);

perhaps you also forgot a squaring, this is not a normal density:

  exp( -( (x-mu)/sqrt(2)/sigma )^2 ) / sigma /sqrt(2*Pi);
  Int(%*exp(-alpha*x), x = -infinity .. infinity) ;
 
  value(%);
  simplify(%) assuming 0 < sigma; 

                                                 2
                        alpha (2 mu - alpha sigma )
                  exp(- ---------------------------)
                                     2

And as you see it does not depend on x.

perhaps you also forgot a squaring, this is not a normal density:

  exp( -( (x-mu)/sqrt(2)/sigma )^2 ) / sigma /sqrt(2*Pi);
  Int(%*exp(-alpha*x), x = -infinity .. infinity) ;
 
  value(%);
  simplify(%) assuming 0 < sigma; 

                                                 2
                        alpha (2 mu - alpha sigma )
                  exp(- ---------------------------)
                                     2

And as you see it does not depend on x.

The error message is shown, since x is an integration variable, you can not solve for it.

And note, that this integral does not exist, you need something bound or better at +- infinity for exp(-alpha*x)

The error message is shown, since x is an integration variable, you can not solve for it.

And note, that this integral does not exist, you need something bound or better at +- infinity for exp(-alpha*x)

?

If you mean the current spam it is already flagged - or do you have something else in mind?

Beyond Maple's own and justifiable interest there are those who ask and those who reply.

If somebody is not completely new s/he will quite quickly be able to judge replies in an intuitive sense (and may only based by the numbers of answers or be tracing older replies), so a simple system is enough (except for some odd buddies).

Conversely the local 'lecturers' do not contribute for being 'famous' or important, their motivations are certainly quite different and often personal, in any case a question of available time and specific interest.

When, oh when ever, will the Marketing guys understand that. Actually for that they behave like formalists, while they intend to be not.

BTW: badges ... it reminds me while I was working for Military "wear your badges visible" ... security clowns insisted in that even if they know that clearance was for good Nato confidential ... and later our owner had this idea with company badges or pins ... I even hate the word ...

Come on ... become serious :-)

These users are mainly adults, that reminds me to school and (religious) education, where the teacher (or pastor) gives you a little picture for being nice.

My 0.02 € on such ...

Is this simplify with respect to side relations?

Is this simplify with respect to side relations?

Ok, that is fine and what I expect as well without manual setting g=h^3
and fiddling around.

But it works not quite yet in cases which are like rational, like some
(positive) constant instead of the '3':

  convert(f, string): StringTools[SubstituteAll](%,"3","Pi"): parse(%):
  simp(%);

Is it that the group laws x^a*x^b=x^(a+b) for the exponent are not used?
Because x^a*y^a = (x*y) ^a is problematic and not always true (assuming
that we talk about (complex) numbers anyway)? Or (x^r)^s?

First 147 148 149 150 151 152 153 Last Page 149 of 209