Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@nm

I meant to execute the eval command after  the laplace expression returns unevaluated as per your originally posted code! Of course it makes no sense to substitute laplace= inttrans[laplace] in an expression that does not contain laplace.

f:= t-> piecewise(t<0,0,t>=0 and t<z,t,t>z,z):
r:= convert(f(t),Heaviside);
r:= inttrans[laplace](r,t,s);
eval(subs(z= 0.5, laplace= inttrans[laplace], r));

Also note that your piecewise can be simplified. It is not necessary to use compound Boolean conditions (i.e., with and) to exclude the conditions that have already been passed over on the left. So, your piecewise can be

f:= t-> piecewise(t < 0, 0, t < z, t, z);

 

@Markiyan Hirnyk 

You're right that it doesn't exactly say "its own execution group"; it says "its own prompt (or line)". Specifically,

It must be executed in a separate prompt (or line) from all other commands, since all commands in a prompt are passed to the kernel at once; entering other commands in the prompt could cause unexpected results.

However, I have found several examples where being on its own line is not good enough. These examples caused me to incorrectly recall the above proviso. I believe that all commands in the execution group are passed to the kernel at once, not just all commands on a line.

 

@nm Why do you say "Ok. Will live with this." after I had already given an Answer that lets you totally avoid loading a package and let's you work with the unevaluated expression??

@Markiyan Hirnyk 

You forgot the line

r:= inttrans[laplace](r, t, s);

which does appear in the OP.

@k20057 5 I don't know why that happens. That's weird. But, anyway, the list T can be sorted into proper order like this:

T:= [{T[]}[]];

@nm 

I didn't read any of the DynamicSystems documentation. I really don't even know what a "dynamic system" or a "transfer function" is. I just know that all modern Maple objects are implemented as modules, and the exports command and :- operator are used to look inside modules. Maple is consistent like that across various packages.

@JohnT 

It is preferred on this forum that you post plain text rather than images.

So, you want the values of q for t from 2 to 150?

q:= t-> (.807*(275000000*t^2/(.572*.3)))*(t^2/((1-.33^2)^3*.3^2))^(1/4):
seq(q(t), t= 2..150);

@nm I agree: Legend placement in Maple is horrible. Note also that the title is somewhat centered over the plot/legend pair rather than over the plot itself. One should be able to put the legend in the plot (inside the axes box).

What makes you "sure" that there is a "special case" solution to this? Have you actually ever seen a Maple plot with a correctly placed stacked legend?

@nm 

Use the legendstyle option:

display(
     [p1,p2], axes= boxed,
     title=`step and impulse reponses`,
     legendstyle= [location= right]
);

Do you mean that you want to extract the coefficients of h[1,1,1] and h[2,1,1]? Note that each one's coefficient will contain the other.

@Joe Riel 

Since the OP said that this was a linear algebra homework problem, I suspect that there is an algorithm (other than brute search) to solve it. I doubt that solving a system of quadratic equations was the intended way.

Clearly msolve has some severe limitations/bugs when solving this problem. However, I've been able to tweak it so that it gives the answer.

 

restart:

n:= 5:

M:= <2,0;0,3>:
P:= <a,b;c,d>:

Eqs:= convert(P^%T.M.P - <1,0;0,1>, set)[];

2*a*b+3*c*d, 2*a^2+3*c^2-1, 2*b^2+3*d^2-1

Note that there are only three equations.

nops({Eqs});

3

We add a fourth equation of the form a = constant for all n possible values of the constant. There is no special reason to choose a for this; any variable will do.

Sol:= {seq(msolve({Eqs, a=k}, n), k= 0..n-1)};

{a = 0, d = 0, {a = 1, d = 2}, {a = 1, d = 3}, {a = 4, d = 2}, {a = 4, d = 3}, {a = 2, b = 2, c = 1, d = 4}, {a = 2, b = 2, c = 4, d = 1}, {a = 2, b = 3, c = 1, d = 1}, {a = 2, b = 3, c = 4, d = 4}, {a = 3, b = 2, c = 1, d = 1}, {a = 3, b = 2, c = 4, d = 4}, {a = 3, b = 3, c = 1, d = 4}, {a = 3, b = 3, c = 4, d = 1}}

We consider to be garbage any solution which does not specify a value for all four variables.

'P' in map2(eval, P, select(S-> nops(S)=4, Sol));

`in`(P, {Matrix(2, 2, {(1, 1) = 2, (1, 2) = 2, (2, 1) = 1, (2, 2) = 4}), Matrix(2, 2, {(1, 1) = 2, (1, 2) = 2, (2, 1) = 4, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 2, (1, 2) = 3, (2, 1) = 1, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 2, (1, 2) = 3, (2, 1) = 4, (2, 2) = 4}), Matrix(2, 2, {(1, 1) = 3, (1, 2) = 2, (2, 1) = 1, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 3, (1, 2) = 2, (2, 1) = 4, (2, 2) = 4}), Matrix(2, 2, {(1, 1) = 3, (1, 2) = 3, (2, 1) = 1, (2, 2) = 4}), Matrix(2, 2, {(1, 1) = 3, (1, 2) = 3, (2, 1) = 4, (2, 2) = 1})})

 

``

 

Download matrix_mod_5.mw

@sajjad 

No, it is not a limitation of Maple. It is mathematically impossible to get any better answer.

@sajjad 

You'll not get any answers better than those containing RootOf. It's mathematically impossible.

@k20057 5 

Are you using the new code that I wrote, the one named RandomPartitions?! That code will not output [0, 0, 0, 0, 8, 0]. All the partitions are sorted in increasing order.

Please post your code or attach a worksheet.

First 532 533 534 535 536 537 538 Last Page 534 of 709