nm

11353 Reputation

20 Badges

13 years, 8 days

MaplePrimes Activity


These are questions asked by nm

I might be doing something wrong here. But when I ask Maple 17 for the integrating factor of this ODE, it does not match the result if I find the integrating factor directly.

restart;
with(DEtools):
ode:=2*t*y(t)+t^2*(diff(y(t), t))+t^2*y(t)-2*y(t)-t*(diff(y(t), t)) = 0;
intfactor(ode);
simplify(exp(int( (t^2+2*t-2)/(t^2-t),t)));

Why I am not getting the same result from the last 2 commands above?

 

hi;
Using Maple 16. In Document mode. Tools->OutputDisplay->2D Math

I want when the output comes out, to be LEFT justified and Not Centered.

The reason is that when I export to Latex, it comes out as

      \[\displaystyle \,{.....

And I do not want the result to be centered. 

I want the math just to be that each equation in the output to start from the 
left edge of the page. So that if I have 3 equations in the output, in my 
latex document, I want them to look like

xxxx
xxxxxxxxx
xx

and not like this

          xxxx
       xxxxxxxxxxx
           xx

I do not mind if it is centered inside Maple itself, on the screen. I just do not
want it to be centered like the above in Latex export. Otherwise
I have to edit the Latex by hand each time I export the Maple document
to Latex and remove the \[displaystyle Latex code by hand. not good.

I looked at the export options also for Latex, and do not see anything
there. I think if I tell it not to show 2D display as displayed equations this should fix things.

I tried 2D Math notation and also Typeset Notation. They both behave the same.

Any ideas?

Maple 16:

Given Matrix A of size nRow,nCol, and a vector b of size nCol, I wanted to divide each value in column 
K by b(K) where k=1..nCol and the result will be a matrix B also of size nRow,nCol ofcourse.

For example, I want to do A[..,1]/b[1],  A[..,2]/b[2], etc.. for each column of A

The way I do it now is by using seq(), then convert the result to matrix, like this:


nCol := LinearAlgebra:-ColumnDimension(A):
B    := convert([seq(A[..,i]/b[i],i=1..nCol)],Matrix);

And it works.  But was wondering if there is a better way to do this. I tried to use apply map but did 
not know how to
Here is below the complete Maple 16 code I have:

------------------------
A := LinearAlgebra:-RandomMatrix(3,4);
b := MTM:-sum(A,1);
nCol := LinearAlgebra:-ColumnDimension(A):
B := convert([seq(A[..,i]/b[i],i=1..nCol)],Matrix);
MTM:-sum(B,1);  #verify the sum is 1

First 197 198 199 Page 199 of 199