nm

8552 Reputation

19 Badges

13 years, 25 days

MaplePrimes Activity


These are questions asked by nm

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)(0)= 1:
sol:=dsolve({ode, ic},y(x));

Gives

 

What is _C2  that shows up there? Since this is second order and I give 2 initial conditions, I did not expect to see any _C in solution.  How should I handle this solution now? (say to evaluate it, etc...) with this unknown _C2 in there?

Maple 18.1 on windows.

I am not sure I know what is going on. I expected to obtain the controllable canonical form in this example, but I am not. May be I am not using it correctly. 

Given A,B, I wanted to transfer the state space to controllable canonical form

http://www.maplesoft.com/support/help/Maple/view.aspx?path=DynamicSystems%2FSSTransformation

In this form, the A matrix will have 1 on the super diagonal, and the last row will have the coefficients of the charaterestic polynomial in reverse order with a minus sign. The B matrix will have all zeros, except for the last entry.  This is what the example on the above page actually shows. 

But when I tried it on my A,B, I do not get this form for the new B matrix. Here is a MWE

restart;
with(DynamicSystems):
A:=Matrix([[0,0,1,0],[0,0,0,1],[-2,-1,0,0],[1,-1,0,0]]);
B:=Matrix([[0],[0],[1],[0]]);
C:=Matrix([[0,0,0,0]]):
D0:=Matrix([[0]]):
sys:=StateSpace(A,B,C,D0): #just to see the polynomial
CharacteristicPolynomial(sys, s);


SSTransformation(A,B,C,D0,form=ControlCanon,output=['A','B']);

The above should be

I am sure I am doing something wrong, but what?

Maple 18.01, windows 7

 

 

If the differential equation has second derivative in the RHS (i.e. in the input), then `StateSpace` gives an error.

I might not be entering it correctly? But if I first create a `TransferFunction` from the ODE, then it works.

Why?

Here is the code:

------------------
restart;
alias(DS=DynamicSystems):
ode2:=diff(y(t),t$2)+2*diff(y(t),t)+3*y(t)=diff(u(t),t)+u(t);
sys:=DS:-StateSpace(ode2,'outputvariable'=[y(t)],'inputvariable'=[u(t)]):
-------------------------
Error, (in DynamicSystems:-StateSpace) unable to convert the differential equation system:  invalid form of derivative in differential equation


But now if I do this, it works:

---------------------------------------------
restart;
alias(DS=DynamicSystems):
ode2:=diff(y(t),t$2)+2*diff(y(t),t)+3*y(t)=diff(u(t),t)+u(t);
sys:=DS:-TransferFunction(ode2,'outputvariable'=[y(t)],'inputvariable'=[u(t)]):
sys:=DS:-StateSpace(sys);
-----------------------------------------------

Maple 18.01 on windows 7.

 

 

Using Maple 18.01 on windows 7.

When setting typesetting level to extended, I get this (which is what I want):

restart;
diff(x(t),t);

But I also wanted to use alias, to make the above show just as \dot(x), i.e. without the (t) as well, since the equations are long, and not having (t) printed next to each letter would make them easier to read. But I found out that if I use an alias as follows

alias(x=x(t))

then now the typesetting level extended no longer works:

restart;
alias(x=x(t));
diff(x,t);

What do I need to make Maple display  only \dot(x) without the argument (t) everywhere?

 

 

 

 

I wanted to answer a question and show an animation contained in an animated gif file. The file is small gif file and is on my local drive on my PC.

I am not able to find a way to include it here as I can easily do on stackexchange so it plays on the screen when someone sees the post.

Does this forum support such a feature? I tried the image->include, and in the URL I typed  C:\foo.gif, but nothing showed up on the post. So it did not work that way.

First 149 150 151 152 153 154 155 Last Page 151 of 164