Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 105 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Haley_VSRC Would you please check the value of c that you transcribed above? I think that you may be off by a decimal place. I concur on your value of (given your b and treating the first four points as outliers), but I get c = 0.35.

Anyway, > 1 is impossible, since the data are concave down.

If you use my method and make just the first point an outlier, you'll get

[A = 4.32368499833578, b = 0.335082182570315e-4, c = .442173738481387].

Using my method decreases the average squared residual by a factor of more than 6 over your method.

Very nice. I love ornate pentagrams. I've figured out what the parameters and do just by inspection. What do pm, and n do? And why is t a parameter rather than a local? Surely it makes no sense for t to be anything other than a name.

@MDD I use the functional operator form (the arrow form) when a procedure is simple enough that it qualifies for it. The procedure Variables above is essentially equivalent to 

Variables:= proc(e, p::{set,list,rtable}(name)) 
     indets(e, And(name, Not(constant))) minus convert(p,set)
end proc:

just like f:= x-> x^2 is essentially equivalent to f:= proc(x) x^2 end proc.

See help page ?operators,functional.

@lham You wrote:

for w^0 , is it correct ?
coeff(ex,w,0)/w^0+coeff(ex, w, -1)/w + coeff(ex, w, -2)/w^2;

Yes, it is correct. The expression in Question doesn't have any w^0 terms (also called constant terms), but, if it did, that would be the way to extract them.

-1 or -2 in above what it means ?

It's the exponent of (since 1/w^2 = w^(-2)).

and another question , i want to write original equation without any factoring 

Use the expand command.

 

Please put your Questions in the Questions section, not the Posts section. I moved this one for you.

@Axel Vogt 

I don't understand the purpose of your reformulation. Yes, it is interesting that Maple can perform that symbolic integration of the MeijerG expression in an instant. Perhaps that was your point. But the Int/diff expression in Question doesn't use the integral of the MeijerG expression; rather, it uses the integral of the square of the derivative of the MeijerG expression. This is much more complicated.

@Axel Vogt 

Here is my simplest "clean" interpretation of the Int/diff expression. By "clean", I mean that each of the three nested definite integrals has its own dummy variable of integration which is not used outside that integral:

H3p_Clean:= proc(ms::algebraic, b::numeric, eps::positive:= 0.5*10^(1-Digits))
local x:= indets(ms, And(name, Not(constant))), D, X, Y;
     if nops(x)>1 then
          error "1st argument must be an expression of at most 1 variable"
     end if;
     x:= x[];
     D:= diff(ms,x);
     evalf(
          subsindets(
               Int(
                    diff(
                         subs(x= Y, D)*Int((-b*X+1)*Int(D^2, x= 0..X), X= 1..Y),
                         Y
                    )*subs(x= Y, ms),
                    Y= 0..1
               ),
               specfunc(anything, Int),
               J-> Int(op(J), epsilon= eps)
          )
     )
end proc:

(I hope that my indentation, line break, and parenthesis style serves to elucidate rather than obfuscate the expression for you.)

In all cases that I've tried, this produces the same numeric results as the original "sloppy" version (posted in the Answer above). (By "sloppy", I mean that the same variable is used for all integrations and differentiations, and it's also used in the limits of the inner integrals.) But the weird thing is that in all cases the sloppy version ran significantly faster, usually by a factor of 2. So maybe the sloppy version is better.

I tried all of the following for the first parameter, msxx^2x^3sin(x)cos(x)exp(x), exp(-x^2)sin(x)+cos(2*x). For each, I used both and -1 for the second parameter, b. I also used the original MeijerG expression with b = .7. I varied the order in which the two integrals were done.

I have Digits set to 15, but I never used an epsilon smaller than .5e-10.

You could do an animation where each frame was one of a sequence of parallel planes intersecting the solid. In each plane, color would represent the value of the function. If you've ever seen an animation of a CAT scan or MRI, you'll know what I mean.

@frajola You wrote:

I recognize that it is a mathematical error to have the same variable in the limits of integration and on the integrand. Not only Maple does not care about it but also most researchers in the particular field that I am studying on.

It is very important that you check that Maple's interpretation of the integral is the same as that of the researchers in your field. Use a known simple case for ms; there's no need for any MeijerGs; you could use ms = x or x^2. Use b = 0 or -1. Compare Maple's answer with the known answer.

@Axel Vogt According to the fourth paragraph of Description at ?RootFinding,Isolate, the user may choose between the RegularChains Maple package or the RealSolving C library. You'd probably be interested in looking at the references at the end of ?RegularChains and ?RegularChains,RealTriangularize. The RegularChains package is massive, with several thousand procedures (of course, only a tiny percentage are documented).

@albert_heinle 

I don't know whether you'd consider this less hacky than specfunc, but you could do this

Ans:= fsolve(...);
if  Ans::function then
    #No real solutions found
else
      #Ans contains some real solution
end if;

It is intended that the above be done in a procedure. If done in top-level code, the use of eval(Ans,1) is recommended to avoid the re-evaluation of the fsolve.

Note that when fsolve (without option complex) returns unevaluated, it is not guaranteeing that there are no real solutions. It just means that it was unable to find any. On the other hand, RootFinding:-Isolate is attempting to give you a guaranteed answer. That's why it takes longer.

@acer 

Can you provide a simple example of an integration where assuming continuous makes a difference? It seems to differ from using continuous as an argument to int. Compare

int(floor(x), x= 0..X) assuming continuous;

with

int(floor(x), x= 0..X, continuous);

@Preben Alsholm 

The following plot of residuals, using fdiff to approximate the derivative, done in Maple 18, doesn't inpsire much confidence in dsolve's solution outside the interval 0.5..0.85. How does this turn out in Maple 2015?

eq:= diff(y(x),x) = cos(x) + y(y(x)-2):
res:= dsolve({eq, y(0)=1}, numeric, delaymax= 1, output= listprocedure, relerr= 10^(2-Digits)):
Y:= eval(y(x), res):
plot(fdiff(Y,[1],[x]) - subs(y= Y, rhs(eq)), x= 0..1);

I don't have much experience with fdiff, and I'm not absolutely sure that I'm using it correctly.

 

@NickB I edited the plaintext expressions into your original Question. The math editor in the MaplePrimes editor produces unreadable results. I don't know of any good use for it.

@maple fan 

You coded:

diff(f1(x,y),x)+diff(f1(x,y),y)+diff(f2(x,y),x)+diff(f2(x,y),y);
remove(has,%,indets(%,'diff'(anything,identical(x))));

The situation where the terms in their entirety are the derivatives is a very special case. In that case, using remove is equivalent to setting the derivatives to 0. But in the general case, using remove(has, ...on an expression of type `+` would remove the entire term if the term had the derivative.

First 484 485 486 487 488 489 490 Last Page 486 of 709