Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 312 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

eval([seq(y=45*r*t, t= 2..150)], r= 5);

How about this?

subsindets(map([op], [op](ex_expr1)), indexed, h-> [op(0,h), [op](h)]);

Put the legend option on the individual plots. Then the display will merge them.

restart:
with(DynamicSystems):
with(plots):
sys := TransferFunction(1/(s^2+0.2*s+1)):
p1:=ResponsePlot(sys, Step(),duration=50,color=red, legend= "step"):
p2:=ImpulseResponsePlot(sys,50, legend= "impulse");
display([p1,p2],axes=boxed, title=`step and impulse reponses`);

Suppose that you call your C with symbolic arguments, so that it returns unevaluated:

C(n,m);

If you use C:= binomial, then the output will be binomial(n,m). But if you use alias, then the output will be C(n,m). This is very useful when you use an alias for a lengthy RootOf expression---one of its common uses.

There are two main differences between an `if` expression and a if statement. The first is that `if` is an expression, so it can appear as part of another expression. For example, `if` can be the first argument to seq. There is only one place where an if statement can appear as an expression: when it appears immediately after the -> of an arrow procedure (and this is only allowed in 1D input).

The second difference is that `if` can return unevaluated. For example,

ex:= `if`(x > 3, 1, 2);

eval(ex, x= 4);

     1

Here's how to build a compound `if` expression equivalent to if - elif - else expression that you gave:

[seq(`if`(x<5, f(x), `if`(x=5, x, x-1)), x= A)];

Note that I was able to use seq instead of map, which would not be possible with if. I think that seq is more efficient in this case because map involves a user-procedure call for each element of A.

In the cases that you present, it is mathematically impossible to get an answer any better than RootOf. Look up the Abel-Ruffini theorem.

Please put your Questions in the Questions section, not the Posts section. This is at least the third Question of yours that I've moved from the Posts section.

I don't see any changes that you've made since the last time that you asked about this code. There are very serious problems in your code such that it makes no sense to ask the above Question until those other issues are addressed.

First, the inverse tangent function is arctan, not atan. Second, you cannot make an assignment inside a return statement (or any other statement). Unlike C, in Maple an assignment is not an expression that can be part of another expression. Third, what's the point of having a loop if you're always going to return on the first iteration?

Correct these and then maybe we can discuss the rest.

All that you need is

a^%T . b . a

You do not need to use with(LinearAlgebra) in order to use these operators.

No subgroup in the set {8, 9, 10} is highlighted because none of them is normal.

G:= GroupTheory:-SymmetricGroup(4):
GroupTheory:-DrawSubgroupLattice(G);


A:= DerivedSeries(G);

map2(diff, x+y+z, <x,y,z>);

If the other code is in a text file, then use read. If it is in a string, then use parse. See ?read and ?parse .

The error is probably caused by floating-point coefficients in your matrix. If A is your matrix, then do

A:= convert(A, rational);

to convert any floats in A to rational numbers.

A:= ExcelTools:-Import("C:/users/carl/desktop/data.xls");
plots:-pointplot(A, style= line);

Click on the plot and press Control-Delete. It does not matter whether the blue border is present. As far as I can tell, Control-Delete will delete any element of a worksheet.

Your differentiation of csc(x)/x by hand is very wrong. Did you remember to use the quotient rule? There is no division in your answer. The denominator should be x^2.

Maple's answer to the second problem differs from yours merely by a trigonometric identity. Take Maple's answer, factor out the minus sign, and apply the identity 1+cot(x)^2 = csc(x)^2. Then they are the same.

First 293 294 295 296 297 298 299 Last Page 295 of 395