MaplePrimes Questions

When using more than 1 package is the following example (ecv3.mw) the best way?  It seems when I use more than 1 package without separating withstatements (using restart commands) my program doesn't work right.  What would be the best way to save the contents of all variables and lprint them at the end of program while preventing the restart commands from emptying variables which have been filled earlier in program execution. Thanks in advance! Les

Hi everyone,

 

I am creating a Maplet containing an area to plot some math function using Plotter command. The point is that I want to put the toolbar native from Maple in order to avoid to add extra buttons for zooming, moving, 1:1 or etcetera the graph, but I have not been successful.

Some suggestions?


Thank you, Friends!

Hello everyone!

Can somebody help me to sovle the following system numerically?

V:=5*10^(-5):
A:=2*10^(-4):
L:=0.02:
C0:=0.01:
d:=0.25:
eq1:=CL(t)*V+CR(t)*V+A*int(CS(x,t),x=0..L):
eq2:=CL(t)=eval(CS(x,t),x=0):
eq3:=CR(t)=eval(CS(x,t),x=L):
eq4:=CL(0)=C0:
eq5:=CL(10000)=C0/2:
eq6:=CL(10000)=CR(10000):
eq7:=V*(C0-CL(t))=A*d*int(eval(diff(CS(x,t),x),x=0),t=0..t1):
eq8:=V*CR(t)=A*d*int(eval(diff(CS(x,t),x),x=L),t=0..t1):
eq9:=diff(CS(x,t),t)=d*diff(CS(x,t),x,x):

Thanks!

I'm trying to export a worksheet to Latex. I'm able to exprot it. But the long equations are not broken into multiple lines. I have used Mathlinebreaking width 5.0 inch in the export option. But it still does not work. I can see the linebreaking command (\\) in the tex file. But when I compile my latex code the pdf does not have any linebreak. The equation just overflows. Any help will be appreciated. 

Assume we have a map f from a polynomial ring R to another polynomial ring S, I know how to compute kernel (a generator for the kernel ideal) of these maps by Singular, but I want to know can I do it with Maple too? Thanks.

An example;

Consider the homomorphism f:k[x,y]-->k[u,v] sending x to v and y to v^2 then using Singular;

ring r1=0,(x,y),lp;

ring r2=0,(u,v),lp;

ideal i=v,v2;

map f=r1,i;

setring r1;

kernel(r2,f);

_[1]=x2-y

So at above I took k a field of characteristic zero. The kernel is the ideal generated by x^2-y.

I am trying to do some algebra with the derivatives of some variables within a program. As a result i need to relable them before i feed them into solve.

To relable them i create vectors and use subs. one of these vectors behaves differently within a proc to how it behaves outside it. This is weird.

TimefullBehavesFunny := proc (nPars, nVars)
local nDiffs, timefull, timeless;
nDiffs := nPars;
timefull := [seq(dx[j, i] = diff(x[i](t), `$`(t, j)), i = 1 .. nVars)];
timefull := [seq(op(timefull), j = 0 .. nDiffs), seq(x[i] = x[i](t), i = 1 .. nVars)];
timeless := `~`[`=`](`~`[rhs](timefull), `~`[lhs](timefull));
timefull, timeless, nDiffs;
end proc

When i run the above for (3,3) i get a differet result to when i run the following
nVars:=3;
nDiffs := 3;
timefull := [seq(dx[j, i] = diff(x[i](t), `$`(t, j)), i = 1 .. nVars)];
timefull := [seq(op(timefull), j = 0 .. nDiffs), seq(x[i] = x[i](t), i = 1 .. nVars)];
timeless := `~`[`=`](`~`[rhs](timefull), `~`[lhs](timefull));

and similarly for other numbers.

any ideasas to why?

Hello, 

How can I flatten this list ? [1,2,3, {4,5,6}]

I tried this :

Flatten([1,2,3, {4,5,6}]); But it doesn't work.

Flatten seems to work only on this kind of list [1,2,3, [4,5,6]]

and I would like to obtain this :[1,2,3,4,5,6]

Thank you for your help

P.S:

If I can use Flatten, it would be fine

Hello,

I have two equations (1) and (2) and i want to divide (2) with (3). A good point is that Maple understand division with equations. Nevertheless, I didn't obtain a simplified solution.

Here my code :

restart;
eq1:=-sin(alpha0(t))*cos(beta0(t)) = -sin(alpha[1](t))*cos(beta[1](t));
-sin(alpha0(t)) cos(beta0(t)) = -sin(alpha[1](t)) cos(beta[1](t))
eq2:=cos(alpha0(t))*cos(beta0(t)) = cos(alpha[1](t))*cos(beta[1](t));
cos(alpha0(t)) cos(beta0(t)) = cos(alpha[1](t)) cos(beta[1](t))
simplify(eq1/eq2,trig);

Here the result obtained :-sin(alpha0(t))/cos(alpha0(t)) = -sin(alpha[1](t))/cos(alpha[1](t))

Consequently, I would like to obtain tan(alpha0(t))=tan(alpha1(t))

Do you have ideas why I didn't obtain a simplified result ? And How can I obtain the solution with tangents ?

Thank you for your help

Hey,

I think I found a bug concerning the useage of assume and alias:

restart:

alias(a=a(t),b=b(t));

a, b

(1)

assume(a(t),real);

getassumptions(a(t));

{((a(t))(t))::real}

(2)

assume(b(t),real);

getassumptions(a(t));

{((b(t))(t))::real}

(3)

getassumptions(b(t));

{((b(t))(t))::real}

(4)

 

 

 

Commenting out the alias command produces correct results. I am on linux with build 922027.

alias_bug.mw

I want to solve a system of equations using f-solve (two unknowns) and exporting the solutions to a matrix where the solutions are in seperate columns. How do I do this?

I have tried:

for i from 1 to 937 do

AP[i,1]:=fsolve(x=KL[i,1].y=KL[i,2],x=..8,y=0..15))

end if

end do

 

But this returns the solutions for X and Y in the same column. Also, for the values that are not possible to solve, it returns the entire expression instead of e.g. 0 or "undefined".

Thank you.

f := a - b;
g := op(f);
seq(abs(g[i]), i=1..nops([g]));

i discover abs still in expression

how to result in [a,b] when input is [a,-b]

 from determinant's polynomial?                                                                                                       

question1 := b(t)*(diff(c(t), t))*(diff(a(t), t))+a(t)*(diff(b(t), t))

how to subs(b(t)=0, question1) result in a(t)*(diff(b(t), t)) ?

in fact b(t) = 0 but diff(b(t), t) != 0 

Dear All

I have updated my Maple 18, I am surprised to see that ordinary "solve" do not work and return error massage like;

"Error, (in coulditbe) invalid input: `coulditbe/internal` uses a 1st argument, obj, which is missing"

or like;

"Error, (in solve) invalid input: hastype expects 2 arguments, but received 1"

I am totally confused !!!

Can anybody help me out please !!!!

 

 


solve({x+2*y = 3, y+1/x = 1}, [x, y])

Error, (in coulditbe) invalid input: `coulditbe/internal` uses a 1st argument, obj, which is missing

 

solve({x+2*y = 3, y+1/x = 1}, {x, y})

Error, (in solve) invalid input: hastype expects 2 arguments, but received 1

 

``


Download Solve_Command.mw

Regards

Hello,

I would like to determine the position jacobian matrix from a set of constraint equations.

Here my constraint equations :

eq1:=l1*cos(theta(t))+l2*sin(beta(t))-x(t)=0
eq2:=l1*sin(theta(t))-l2*cos(beta(t))=0

The jacobian matrix that I would like to determine is :

 

Can you help me to make a general procedure to calculate a jacobian position matrix from a set of constraint equations ?

Thank you for your help

 

First 1157 1158 1159 1160 1161 1162 1163 Last Page 1159 of 2428