nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are replies submitted by nm

@acer 

thanks, mul removes the division by zero. Would you know how to get rid of the extra empty () that shows up now?

a:='a';
f:= i->mul( `if`(i<>j,(a-z(j))/(z(i)-z(j)),NULL),j=1..3);

f(1)

I had to use NULL to make `if` happy since `if`wants 3 arguments. What else to put there instead of NULL to obtain nothing basically. I just want to skip this entry all togother.

ps. I do not know why "mul" worked but not "product", but will look into this to find out.

@Mac Dude 

In fact, Maple's image processing abilities are not strong at all compared to, e.g., "that other CAS".

I am almost sure that Mathematica (that other CAS?) did not write png export/import from scratch, and they simply link to some standard C library to do this (Netpbm, etc.. ) and simply provide a Mathematica functions to interface to. So I do not know why Maplesoft can't do the same (I assume Maple can make calls to C internally if needed).  This is something a professional programmer can do in one month time I would guess.

If I have to use external tools, I know I can do that anytime ofcourse. I have Linux and have access to all these things via command line calls right now. I just wanted to see if this can be done in Maple as well.

@Kitonum 

At the point  x = 0, violated the conditions of existence and uniqueness of solutions

This then explain the constant in the solution? Since it is not unique, then for any _C, one get a new solution.

@Carl Love 

Thus it is not proper to give initial conditions at that point.

I tried it with D(y)(1)=1; and still got a _C2 in the solution:

restart;
ode := (-6 + 3*x - 3*x^2 + 2*x^3)*y(x) + x*(6 - 3*x + x^3)*diff(y(x),x) + x^2*(-3 + 3*x - 3*x^2 + x^3)*diff(y(x),x$2)= 0;
ic := y(0)= 0, D(y)(1)= 1:
sol:=dsolve({ode, ic},y(x));

Only when I changed y(0)=0 to y(1)=0, now there was no constant of integration generated in the solution.

But this brings up a second question for me: Should one have got a solution in first place if the initial conditions given makes the ode ill defined to be solved? Should have Maple said something, or at least a warning message generated or such?

 

@Markiyan Hirnyk 

Why do you think the output should be

Actually, it is not me who thinks so, I am just going by all the textbooks I have, the professor who teaches us the course who said so, all the references on the net. By definition, this is what a controllable companion form is.

Unless Maple uses different definition. The problem is in the new B matrix/vector, not the A matrix. But here are some references to answer you:

From "Modern Control System Theory" book

From: "Design and Analysis of Control Systems By Arthur G.O. Mutambara"

 

Some references put the filled row on top instead of bottom (they reverse the states order), but still, there is only one row in B which is "1" and everything else is zero. This is not as common as the above definitions.

http://en.wikipedia.org/wiki/State_space_representation

try to write a title for the subject with something more meaningful. The subject title should describe what the problem is in few words. It is not important to say you are first year student or second year in the subject, since this has nothing to do with the problem.

@Joe Riel 

Thanks for the feedback. But I do not see the issue. The input Ihave gives proper TF. Hence Maple should be able to do the conversion. We do this by hand in class for HW. So If I can do this by hand in 3 minutes, I do not see why Maple can't do it. There is a standard procedure to do this conversion.

If the TF comes out to be improper, then I expect Maple to give an error.

Fyi, Mathematica can handle derivative in the RHS of the differential equation, and still gives a state space represenation. screen shot:

I think this is limitation in Maple and should really be fixed.

Thank you

 

For general questions like yours, google is best. I just typed

solve PDE in maple

in google and got 50,000 hits.

If you have specific question, then you should show the specific code you used and the problem you are having.

 

WHat does this logic supposed to do?

------------------------
for z from 1 to nops(quotientlist) do
if
finallist2 := [op(finallist2), op(z,quotientlist)];
od:
-------------------

What is "if" doing above? Is this cut/paste problem?

@ecterrab 

thanks! that worked. Here is an example of one equation using the earlier version and the new version (using the PDEtools method). It is more clear now.

I hope the dot on top can be made to work in version 19, as it is a little more clear. When there is an exponent next to the letter, it is hard to see the prime as compared with the dot as one can see. But for now, I will use your method and keep hoping version 19 will fix this.

@H-R 

yes, collect does not work in this case. May be used one of the methods shown below. A direct way is

f:=(m+n)*b*x+(m+n)*b*y;
(m+n)*simplify(f/(m+n));

but I think using algsubs() as shown by one of the comments below is the right way to do this.

@Mac Dude 

that is not symbolic linear algebra. in symbolic linear algebra, one is supposed to be able to define a matrix and give some properties about it, and then do algebra on it as a symbol, without actually allocating full storage for such a matrix as happens normally now. I read somewhere that Mathematica was supposed to add this feature sometime (it was not there in version 9, and have not checked version 10 yet).

@Joe Riel 

Is there a reason to use frontend command as in frontend(diff,[T,du]) over using Physics:-diff(T,du)? And which would be better? I use Physics:-diff for this sort of thing and did not know about frontend()

Can you suggest a way (without using "op" command) to write f as:

f=a*(b*x+b*y)

why must the op be used? What is wrong with collect(f,a) ? Use the right command for the correct usage.

@Joe Riel 

I've seen so many code that looks like  L:=[seq(i,i=1...N)] which creates a list. So I should be using something like L:=Vector(seq(i,i=1..100)): from now on. 

I did not know this about Maple lists, as in  Mathematica lists are mutable, so very fast to access and modify as is and not have to worry about this aspect of performance hit or change the data struct from list to something else.

Thanks for the explanation and the example.

First 80 81 82 83 84 85 86 Last Page 82 of 91