MaplePrimes Questions

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

 

What is the easiest way to ask roots of a polynomial on a finite field. For example asking roots of x^2+xy+y on GF(8)? I was thinking to run a two for on members of GF(8) and ask to check it but I couldn't do it using Galois package or maybe I couldn't use that package. Thanks for any help.

I am wondering why Maple does this.

> f:=x^2
> f(3)
output: x(3)^2

I understand the difference between an expression and a function. If f is an expression, shouldn't it ouput  x^2(3). Why is the output x(3)^2?

When I enter f*3 or f*(3) then I get the correct expression.

Here is a screenshot. http://prntscr.com/a7u9hm

Here is image inserted with a slightly different function

 

Also while I am here, what exactly does g(x):= x^2 do? when i enter g(3) I get g(3) back.

g(x) is neither a function nor an expression.

screenshot http://prntscr.com/a7ua75



Dear All

I have third party Maple package saved along path E:/Maple work/General Maple Workout/TWS.mpl, but after using march command for other package, Maple is reporting error like "unable to read; E:/Maple work/General Maple Workout/TWS.mpl". What could be possible reason for this?

Moreover when I type "currentdir()" it shows me "C:\WINDOWS\system32" which is right path from where Maple is working

Regards

Hello,

I  put a caption under a plot and I want to use subscript. Since this is not the math mode, [] or __ does not work. Anyone knows, how to use subcript under the plot caption?

 

Thanks,

 

Hi all, 

 

I was wondering if it is possible to add a colour gradient to a point plot to represent another perameter in the data.

 

 

For example, each point corresponds to a value of 'f' ranging from 0.1 to 1, and I was wondering how to display this by means of a colour gradient.

 

 

Thanks,

First 1163 1164 1165 1166 1167 1168 1169 Last Page 1165 of 2434