Joe Riel

9660 Reputation

23 Badges

20 years, 4 days

MaplePrimes Activity


These are answers submitted by Joe Riel

For n points, with m collinear I expect the answer to be

binomial(n - m, 2)*m + binomial(m, 2)*(n - m) + binomial(n-m, 3)

An alternative is to use map, which returns a list (because its second argument is a list):

map(op, [1,3,4], a);

                             [2, "john", sin(57)]


Here's a clever approach.  It assigns a package that reassigns the one Maple postfix operator (!).

tailevalf := module()
option package;
export `!`;
    `!` := proc()
        evalf(_passed);
    end proc;
end module:
> with(tailevalf);
                                      [!]

> sin(Pi/3)!;
                                 0.8660254040

> unwith(tailevalf):
> 5!;
                                      120

 

This forum is for Maple users; I'm guessing you aren't using Maple.  Get all x terms on one side, factor out the x, then divide by the coefficient.  For example:

 x/2 + x/6 = 1

 x*(1/2 + 1/6) = 1  # factor out the x

 x*(2/3) = 1           # combine fractions

 x = 3/2                 # divide by coefficient of x

See the help page ?worksheet,documenting,styles.  The first subsection explains how to save a style as the default.

 

Did you try collect(T1,x).  Is that what you want?

You might scale to make a polynomial and then use PolynomialTools:-CoefficientList:

PolynomialTools:-CoefficientList(expand(T1/x^(min(0,ldegree(T1,x)))),x);
[2/3 q[1], 2 + 2/3 q[2], Pi I + 2 q[1], -p[0] + Pi q[1] I + 2 q[2],

    -p[1] + Pi q[2] I, -p[2], -p[3]]

I doubt there is such an expansion.  It isn't too hard to see why.

 

Why do you say the answer is wrong?  What do you expect?  0?  If so, don't ask for a series but a limit:

limit(f, x=infinity);
                                0

 

For the third task, it is more efficient to use PolynomialTools:-CoefficientList (or CoefficientVector):

PolynomialTools:-CoefficientList(convert(A,polynom),x);      
                                                                 -1
                                   [0, 1, 0, -1/6, 0, 1/120, 0, ----, 0, 1/362880]
                                                                5040
That is better because it makes a single call to coeffs and then converts to a list (inserting 0 where applicable). Efficiency won't matter for this simple polynomial, however, for larger ones it can.

Do you mean why the word "unapply" and not some other name?  The reason, I believe, that "unapply" was chosen is that the operation is, in some sense, the inverse of function application (which can be done with the "apply" command).  See the help page for apply, which states

- Using unapply, the apply procedure satisfies the functional equation 
  apply(unapply(p, v), op(v)) = p. 

Can you give an example?  Have you tried executing the examples in the BodePlot help page (use the button that converts a help page to a worksheet)?

I wouldn't suggest the following---it presumes some stuff that I'll guess you haven't learned---but others may find it interesting:

T := 4*x^2 - 4*x*y + y^2:
C := x^2 + y^2 - 5^2:

with(difforms):
defform(x=scalar, y=scalar):
dTC := factor(scalarpart(d(T) &^ d(C)));
                         dTC := 4 (x + 2 y) (2 x - y)

sol := solve({dTC,C}, [x,y]):
map(subs, sol, T):
convert(%,radical);
                                   [125, 0]

Nicer, but also not suitable, I suspect, is

with(Student[MultivariateCalculus]):
stationary := LagrangeMultipliers(T,[C],[x,y],output=detailed):
convert(map(subs, [stationary], T), radical);
                                   [0, 125]]

Its not clear what you want.  Just a plot?  Or are you trying to fit curves to the data?

While it may not solve your problem, you can compute the asymptote of the transformed integral:

evalindets(eq3, Int(anything$2), limit, k=infinity);
                                      1
                                      ---
                                      4 k
First 86 87 88 89 90 91 92 Last Page 88 of 114