You must have used the command with(inttrans) somewhere, otherwise Maple wouldn't have plotted the first y1. However, I have no problem with the second. What version of Maple are you using? Note that y1 is expressed in terms of the Heaviside function, which may have caused problems for some versions of Maple (my memory is fuzzy).
A mathematical, rather than programmatical, approach is the simpler
SplitPolynomialEvenOdd := proc(poly::polynom(anything,v), v)
description "return the even and odd parts of a polynomial in v";
p := collect(poly,v);
m := subs(v=-v,p);
return ((p+m)/2, (p-m)/2);
Here's one approach.
2 2 (3/2) 3
eqn := -p~ (l~ - a~ ) + a~ q~
eqn2 := isolate(eqn,a^3);
2 2 3/2
3 p~ (l~ - a~ )
eqn2 := a~ = -----------------
map(x -> x^(2/3), %);
/ 2 2 3/2\(2/3)
3 (2/3) |p~ (l~ - a~ ) |
(a~ ) = |-----------------|
\ q~ /
/ 2 2 3/2\(2/3)
2 |p~ (l~ - a~ ) |
a~ = |-----------------|
\ q~ /
# At this point it is tricky to get Maple to distribute
# the power. Easier just to do it by hand:
eqn3 := a^2 = (p/q)^(2/3)*(l^2-a^2);
2 / p~ \(2/3) 2 2
eqn3 := a~ = |----| (l~ - a~ )
\ q~ /
sol := solve(eqn3,a):
// / p~ \(2/3)\ / p~ \(2/3)\1/2
||1 + |----| | |----| | l~
\\ \ q~ / / \ q~ / /
/ p~ \(2/3)
1 + |----|
\ q~ /
Again, distribute the power by hand. Is there a command that does that? It's easy to write one, though it won't be rigorous. You could try using the RealDomain package; that nearly solved the problem in one go but I couldn't figure out a clever way to factor out the common terms in the numerator and denominator.
You write "maxima", meaning more than one maximum. What do expect to get for the given expression, assuming the chosen component is one? That is, do you want to get the indices 1 and 2, corresponding to the two components whose first element is 8? If that is what you want, then the following will return the list of indices:
maxima_indices := proc(indx::posint, lst::list)
val := max(seq(op(indx,elem),elem in lst));
,i = 1..nops(lst))
H1 := [[8,9,11],[8,10,11],[5,10,6]]:
[[1, 2], [2, 3], [1, 2]]
I'm unsure as to the precise mechanism, however, this is probably caused by the assuming keyword making a substitution into the table (a local variable z~ with assumptions replacing z), the result evaluated, then the original z replacing the z~. At the conclusion of this we are left with a different table, identical to the original. It has no name and must be displayed as a table.
I don't know what your second question means.
I'm not sure what you want. Currently, the only way for users to generate help pages is by writing them in the Maple gui (templates are available), saving them as worksheets, then using Maple commands (makehelp and INTERFACE_HELP) to save the worksheets as help pages in a help database. This is acceptable for a small package with a few help pages but is cumbersome for larger packages with many help pages.
I wrote a small package, generichelp, that can be used to strip the user style table from a user created help-page/worksheet. The reason for doing this is that it ensures that the created help pages behave like the ones supplied by Maplesoft; that is, they do not contain character and paragraph styles that are specific to the creator. The original version is available at my home page
. I've recently revised it to be compatible with Maple 10 but need to finish it.
About a year ago I began work on a package for generating Maple help pages from text files using a custom markup language. Alas, it is not ready for release and I haven't been motivated to work on it for awhile.
1. Not sure.
2. Tools > Options > Display > Input Notation = Maple Notation
3. To change colors you want to create a custom default style, modifying, in particular, the character styles "Maple Input" and "2D output" (there are other output styles that you will probably want to modify as well). I described the basics here.
Assuming that the constraint expression, g, is supposed to be equal to zero,
f := 1000*x+7500*y:
g := 10000000-(20000*x^0.8)*y^1.2:
[58.73094715, 11.74618943], [-58.73094715-.3095363126e-18*I, -11.74618943-.6190726252e-19*I]
You can use fnormal and simplify/zero to remove the vestigial complex part.
I cannot reproduce that,
a := 4;
What do you want to do with the list? You can always convert the names to strings:
I'm not sure that you have completely described the problem. Your procedure does not declare k as local, so if A, B, or C are in terms of the global k, they will be summed accordingly:
2 2 3 2 3
(ku1 + 1) ku1 kl1 kl1 (ku2 + 1) (ku2 + 1) ku2 kl2
---------- - --- - 1/3 - ---- + --- + ---------- - ---------- + --- - ----
2 2 2 2 3 2 6 3
2 4 3 2 4 3 2
kl2 kl2 (ku3 + 1) (ku3 + 1) (ku3 + 1) kl3 kl3 kl3
+ ---- - --- + ---------- - ---------- + ---------- - ---- + ---- - ----
2 6 4 2 4 4 2 4
Is that what you want? If not, that is, if you meant k to be local, then just do
adds := proc(a,b)
Use a print statement in the loop to print intermediate results. You might also want to consider terminating the for loop with a colon so that the final result is not displayed twice. Using your example,
for i from 0 to 10 do
print(f(i) mod 11);
p := (n+2 -k)*(n+1-k):
(n + 2) (n + 1) + (-2 n - 3) k + k
The k^0 term is not shown.
I'm not sure what you want. Something like the following, where x is the variable name and 1,2,3, and 4 are sample indices (this doesn't render very well in html: 12x34.
I don't believe that is any good way to do this in Maple, particularly the indices at the 1 and 2 slots. You can fake the index at the 3 slot using a power, however, that invariably causes problems. I believe we are stuck with subscripted indices only.
One approach is to use fsolve. Its default is to restrict the solution to the real axis.