nm

11413 Reputation

20 Badges

13 years, 72 days

MaplePrimes Activity


These are replies submitted by nm

looking at help page for Dynamic systems, there is no equivalent command in Maple for imp2ss. At least I could not find it looking at all the commands there.

This is a system identification problem (or system realization). Given an impulse response, estimate what the system that could have generated this would be.

 

 

 

@acer 

When making the pattern, it is ofcourse up to the person to decide when the pattern is valid or not.

The only difference between using the pattern and using Maple's other commands, is that the assumption in the later case is explicit.

For example

restart;
expr:=sqrt(A)*sqrt(B);
combine(expr,radical) assuming B>0

vs.

unassign('a,b');
patmatch(expr,sqrt(a::anything)*sqrt(b::anything),'la'):
assign(la);
sqrt(a*b);

In production code, one would add comments next to pattern so that to make it clear when it is valid, or add extra logic to check. But it is up to the programmer who made the pattern to know when the transformation is valid or not.  

@janhardo 

These are textbooks we used at school, I found them good:

Elementary Differential Equations and Boundary Value Problems, 10th Edition. William E. Boyce,200e Richard C. DiPrima

and

Applied Partial Differential Equations with Fourier Series and Boundary Value Problems, 5th ed. Richard Haberman

For Fourier Series background, this was the textbook we used

Fourier Series and Boundary Value Problems, 8th edition by Brown

Just like learning anything in math, solving as many problems as you can by hand, and then using the computer to check your answers is a good way to improve ones skills.

 

 wish to assign the values 1 and 7 to x

 

  How could a variable have 2 different values at the same time? Or do you want x to be the list [1,7] or set {1,7} ?

@vv 

sure, thanks. I know I could do this. But It seems to me copy folder should be part of FileTools along with the many other commands there (which could also be done using system calls if needed). The whole idea is that FileTools puts a generic layer between system specific calls and Maple so the code works on any platform.

@Carl Love 

This unfortunately does not always work. As Maple can return free variables such as _t2[3] and _t0[5] and _t[7] and so on. Each time it is called, it is different.

 

 

in math, you can not take derivative with respect to a sum. So

            diff( f(a,b), a+b) 

makes no sense. (At least at school the teacher never mentioned such a case)

 

The argument to diff needs to be a symbol.  

 

 

@Carl Love 

"Thus, it's safer to use x__1."

This is good to know. This is what I ended up using. I also found that x__(t) is a little easier to read in the editor than x[1](t)

@Carl Love 

"

  • There is an algorithm to generate another (linearly independent) eigenvector from this same eigenvalue called the defective eigenvalue method.

The algorithm that you speak of does not generate (true) eigenvectors; rather, it generates generalized eigenvectors. Given the matrix A and vector v__2 from your example, you can easily check that A.v__2 <> 3*v__2, and thus v__2 is not an eigenvector."

Yes, they are called generalized eigenvectors and this is what our textbook uses. So I am following it.

 

I was asking if Maple implements this algorithm. i.e. I give it v1, and the number of missing eigevectors needed, or giving it A, and the defective eigenvalue, and it will generate all the eigenvectors associated.

I know how to do it by hand, (solved many problems like this) but I wanted to automate/program it.

I have to use this algorithm and not Jordan form method since this is what our text uses. It is not hard to code it. I just wanted to know if Maple has a package that allready does it.

Reference: Differential equations and linear algebra. 4th edition. Edwards,Penney, Calvis.

@ecterrab 

Thanks, I did not know about "PDEtools/max_C". That is a good function.

"suppose you know the differential order of the equations you are handling"

I do not know for sure. These ode's are read from different textbooks by a program I wrote. In general, these will be low order ODE's, since the books I use are for undergraduate.  Also, there are systems of linear ode's, and not just one single ODE. The A matrix for the system of linear ode's can be large.

So I thought it will be better to be general on the largest number for _Cn.  I do not like to hardcode numbers inside a program if I can avoid it.

 

@Pascal4QM 

thanks for the suggestion. But the main issue is how to avoid hardcoding how many _Cn there are? In your example you used 1..3.

Acer's solution works for any value.

Using your solution works, but for 3.

restart;
replace_all_C:=proc(expr::anything)
local c,k;
alias(seq(c[k]=_C||k,k=1..3));

    return Physics:-Latex(expr,output=string);
end proc:

sol:=dsolve(diff(x(t),t$4) = x(t));
s:=replace_all_C(sol)

s := "x \\left(t \\right) = c_{1} {\\rm e}^{-t}+c_{2} {\\rm e}^{t}+c_{3} \\sin \\lef\
t(t \\right)+\\mathit{\\_C4} \\cos \\left(t \\right)

"

In the above _C4 was not changed.

I can change the function to use 1..4 but then it will not work if there happened to be more constants.

So even though using alias works, the issue is in using that hardcoded number, as I had with my original solution which I wanted to avoid.

 

@ecterrab 

Thanks fo the quick fix.I updated to 806 and problem is no longer there.

 

 

@Jean-Michel Collard 

I am on windows 10. Maple 2020.1.  I used to have many problems before with Physics update (posted about it) but not many issues any more.

Only thing I noticed, is that sometimes (may be 1 out of 5 times) when I click the install button to install latest version of Physics from the GUI, and even though I made sure to click restart in my worksheet before doing this, I get error, permission denied

ERROR: The package could not be installed.
error PackageTools:-Install, "permission denied when trying to copy to 
%1", "C:\Users\me\maple\toolbox/Physics Updates/lib/Physics Updates.maple"

But each time this error happens, it is fixed by closing Maple, and restarting it, then clicking on the "reinstall" icon below the Physics package and now it always works with no error.

Interesting it always thinks last attempt was installed OK, because I do not see the red marker next to the Physics package saying that an update is available. So Maple think it was installed OK, even though there was an error.

That is why I have to select "reinstall" to make sure it was installed OK. To be safe.

 

 

@Carl Love 

Thanks. "...may include ODEs or algebraic equations". made it more clear what it meant.

 

@ecterrab 

Thanks. I did not know about PDEtools:-Infinitesimals

You said "Basically all the symmetry commands in (O)DEtools have an equivalent in PDEtools. For symgen, the equivalent is Infinitesimals"

Do you suggest then to use PDEtools:-Infinitesimals instead of DEtools:-symgen for find the symmetries?

I Just did quick test (without knowing too much about all the other options for PDEtools:-Infinitesimals since I never used it before), I  noticed for some cases, symgen gives result, where PDEtools:-Infinitesimals seems to hang. For example

restart;
ode :=diff(y(x),x)=(x+cos(exp(-x)*(1+x)+exp(y(x))))/(exp(x+y(x)));
DEtools:-symgen(ode,HINT=[f(x),x*g(y)]);

But

PDEtools:-Infinitesimals(ode,HINT=[f(x),x*g(y)])

just says "evaluating....". I waited for long 5 minutes and nothing happened.  May be I need to look at the other options to see why this happened and figure what is going on...

ps. I do not understand this line in the help page for ?PDEtools:-Infinitesimals

where it says 

"PDESYS- PDE or a set or list of PDEs; it can include ODEs and not differential equations"

What is the difference between ODEs and differential equations in the above?

Thanks

 

First 49 50 51 52 53 54 55 Last Page 51 of 91