MaplePrimes Questions

A. how to find xx1,xx2,xx3,yy1,yy2,yy3 that
Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]])) =(1/2)*aa*d*s*u+(1/2)*aa*d*s*a*t+(1/2)*d*v*u*t+(1/4)*d*v*a*t^2;
 
B. how to find x1,x2,x3,x4,y1,y2,y3,y4 that expand(
(x2 - x1)*(y4 - y3) - (y2 - y1)*(x4 - x3)) = (1/2)*d*s*aa*v+(1/2)*d*aa*v*u*t+(1/4)*d*aa*v*a*t^2+(1/2)*aa*d*s*u+(1/2)*aa*d*s*a*t+(1/2)*d*u^2*t+(3/4)*d*u*a*t^2+(1/4)*d*a^2*t^3;

I have a set of 15 equations in state space form, and I'm just trying to program a way to substitute all variables representing the time derivates as for example x__s_dot (t) as diff(x__s (t), t)  and diff( x__s_dot (t),t) as diff(x__s (t), t,t) so I can manipulate my equations easier.

The last half of the list xx has the variables that I want to substitute, the x,y and u (with respective diff(x__s (t), t) ) variables are always constant, but in the case of zeta, eta and u I might have indexes from 1 to n , in this case just 1 and 2.

I tried a bunch of methods including creating vectors with the seq, op commands and substituting them into my original equations with subs, algsubs but none of the things I programmed worked the way I wanted, I ended up with a very inefficient way , doing it manually, but the point is that I wanted to automate this bit. I've been doing maple for about 2 weeks and I still struggle a lot with it, I would greatly appreciate any guidence/advice.


My original equations are actually much bigger and my original code too, I tried to shorten it a bit just for making my problem simpler to understand but the equations still look really big here, If there is another way to format this question please do advice so.

EDIT : I think my last code was hard to understand because my equations were too big and it looked all messy and horrible, I edited to show just one vector of variables, I think that if it works here, it should work on the rest of my code:


 

NULL

interface(rtablesize=50):

xx := [x__s(t), y__s(t), u__s(t), x__r(t), y__r(t), u__r(t), x__c(t), y__c(t), u__c(t), zeta__1(t), eta__1(t), u__1(t), zeta__2(t), eta__2(t), u__2(t), x__s_dot(t), y__s_dot(t), u__s_dot(t), x__r_dot(t), y__r_dot(t), u__r_dot(t), x__c_dot(t), y__c_dot(t), u__c_dot(t), zeta__1_dot(t), eta__1_dot(t), u__1_dot(t), zeta__2_dot(t), eta__2_dot(t), u__2_dot(t)]:

nq := 15;            
xxUNDOT := [ seq ( xx[i], i = 1..nq),
             seq ( diff(xx[i],t), i = 1..nq)];
 

15

 

[x__s(t), y__s(t), u__s(t), x__r(t), y__r(t), u__r(t), x__c(t), y__c(t), u__c(t), zeta__1(t), eta__1(t), u__1(t), zeta__2(t), eta__2(t), u__2(t), diff(x__s(t), t), diff(y__s(t), t), diff(u__s(t), t), diff(x__r(t), t), diff(y__r(t), t), diff(u__r(t), t), diff(x__c(t), t), diff(y__c(t), t), diff(u__c(t), t), diff(zeta__1(t), t), diff(eta__1(t), t), diff(u__1(t), t), diff(zeta__2(t), t), diff(eta__2(t), t), diff(u__2(t), t)]

(1)

DOTL := [ seq ( xx[i], i = 1..nops(xx)) ]:
DOTR := [ seq ( xxUNDOT[i], i = 1..nops(xx))]:
Vector[column](DOTL),Vector[column](DOTR);

for i from nq+1 to nops(xx) do
newxx    := subs[inplace][eval](
  op(i,DOTL) = op(i,DOTR) ,xx):
end do:

Vector(30, {(1) = x__s(t), (2) = y__s(t), (3) = u__s(t), (4) = x__r(t), (5) = y__r(t), (6) = u__r(t), (7) = x__c(t), (8) = y__c(t), (9) = u__c(t), (10) = `ζ__1`(t), (11) = `η__1`(t), (12) = u__1(t), (13) = `ζ__2`(t), (14) = `η__2`(t), (15) = u__2(t), (16) = x__s_dot(t), (17) = y__s_dot(t), (18) = u__s_dot(t), (19) = x__r_dot(t), (20) = y__r_dot(t), (21) = u__r_dot(t), (22) = x__c_dot(t), (23) = y__c_dot(t), (24) = u__c_dot(t), (25) = `ζ__1_dot`(t), (26) = `η__1_dot`(t), (27) = u__1_dot(t), (28) = `ζ__2_dot`(t), (29) = `η__2_dot`(t), (30) = u__2_dot(t)}), Vector(30, {(1) = x__s(t), (2) = y__s(t), (3) = u__s(t), (4) = x__r(t), (5) = y__r(t), (6) = u__r(t), (7) = x__c(t), (8) = y__c(t), (9) = u__c(t), (10) = `ζ__1`(t), (11) = `η__1`(t), (12) = u__1(t), (13) = `ζ__2`(t), (14) = `η__2`(t), (15) = u__2(t), (16) = diff(x__s(t), t), (17) = diff(y__s(t), t), (18) = diff(u__s(t), t), (19) = diff(x__r(t), t), (20) = diff(y__r(t), t), (21) = diff(u__r(t), t), (22) = diff(x__c(t), t), (23) = diff(y__c(t), t), (24) = diff(u__c(t), t), (25) = diff(`ζ__1`(t), t), (26) = diff(`η__1`(t), t), (27) = diff(u__1(t), t), (28) = diff(`ζ__2`(t), t), (29) = diff(`η__2`(t), t), (30) = diff(u__2(t), t)})

(2)

Vector[column](newxx);

Vector(30, {(1) = x__s(t), (2) = y__s(t), (3) = u__s(t), (4) = x__r(t), (5) = y__r(t), (6) = u__r(t), (7) = x__c(t), (8) = y__c(t), (9) = u__c(t), (10) = `ζ__1`(t), (11) = `η__1`(t), (12) = u__1(t), (13) = `ζ__2`(t), (14) = `η__2`(t), (15) = u__2(t), (16) = x__s_dot(t), (17) = y__s_dot(t), (18) = u__s_dot(t), (19) = x__r_dot(t), (20) = y__r_dot(t), (21) = u__r_dot(t), (22) = x__c_dot(t), (23) = y__c_dot(t), (24) = u__c_dot(t), (25) = `ζ__1_dot`(t), (26) = `η__1_dot`(t), (27) = u__1_dot(t), (28) = `ζ__2_dot`(t), (29) = `η__2_dot`(t), (30) = diff(u__2(t), t)})

(3)

``


 

Download subs.mw

I tried to make a for loop that substitutes each variable one by one, but it only seems to work for the last term, I don't know why, please help or suggest another method? I also have diff(x__s,t,t) terms in my equations, not just diff(x__s,t), but I guess only by specifying the first derivate it should work?

 

Thanks.

 

how can i solve coupled differential of equation with rkf or another method

maple.mw

A1 , A2, A3 ??

v=u+at                      (1)
s=u*t+1/2*a*t^2        (2)

below 3 equations, can substitute  (1)  into it to form (2)
s=1/2*(u+v)*t       (3)
v^2=u^2+2*a*s    (4)
s=v*t-1/2*a*t^2    (5)

can these 5 equations be considered as a solution set of solve function?

or

is only first 2 equations be a solution set?

if so, number of equations less than 5 variables, is there something missing?
 

i want to dsolve frome this equation . but i cant

1.mw


 

op(2, -(1/4)*z^2-(1/18*I)*z^3+(1/96)*z^4+(1/600*I)*z^5-(1/4320)*z^6-(1/35280*I)*z^7+(1/322560)*z^8+(1/3265920*I)*z^9-(1/36288000)*z^10-(1/439084800*I)*z^11+O(z^12))

-((1/18)*I)*z^3

(1)

op(2, series(Ei(I*z)-gamma-ln(z)-I*csgn(I*z)*Pi-I*z, z, 12))

2

(2)

series(Ei(I*z)-gamma-ln(z)-I*csgn(I*z)*Pi-I*z, z, 12)

series(-(1/4)*z^2-((1/18)*I)*z^3+(1/96)*z^4+((1/600)*I)*z^5-(1/4320)*z^6-((1/35280)*I)*z^7+(1/322560)*z^8+((1/3265920)*I)*z^9-(1/36288000)*z^10-((1/439084800)*I)*z^11+O(z^12),z,12)

(3)

is(series(Ei(I*z)-gamma-ln(z)-I*csgn(I*z)*Pi-I*z, z, 12) = -(1/4)*z^2-(1/18*I)*z^3+(1/96)*z^4+(1/600*I)*z^5-(1/4320)*z^6-(1/35280*I)*z^7+(1/322560)*z^8+(1/3265920*I)*z^9-(1/36288000)*z^10-(1/439084800*I)*z^11+O(z^12))

false

(4)

``


 

Download op_error.mw

Hello,

Is there a Maple command for copying a text to the clipboard ? (Apart from using the contextual menu or the Edit-Copy menu option)

For example:

ee := x^2+y^2+z^2

CopyToClipboard( convert(ee,string) )

Thank you,

César Lozada

 

 

 

work.mw

I'm having problems plotting these three functions on the same graph. I can get two of them, but as soon as I try to add the third, it throws a couple errors no matter what I do. It doesn't help that the docs are confusing. The first two functions are approximating diff(y(x),x) = -2xy(x)+1 with the Euler method (step size of 0.05 and 0.1) that I implemented using a for loop. I gather the data into an array and then plot those. That works. But once I try to set y(x) equal to a Taylor approximation, I can plot that graph but the values for the other functions are strangely absent. I've attached my work. What is wrong with my syntax and how can I plot all three functions at once?

I want to plot a function f(x,y)=x^3-2x^2y. But I only want to plot values where $x^2+y^2 <= 1$. So far I specified the plotting range in the standard way, but I really need to specify it like I described. I want to use plot3d.

Hello,

How can we write a code for solving following system of Pdes ?

restart;
PDE1:=m1*diff(w1(x,t),t$2)-S1*diff(w1(x,t),x$2)+k*(w1(x,t)-w2(x,t))=F1(t)*delta(x-x1);
PDE2:=m2*diff(w2(x,t),t$2)-S2*diff(w2(x,t),x$2)+k*(w2(x,t)-w1(x,t))=F2(t)*delta(x-x2);

In here,  Ki, mi, xi and k are constants where i=1,2.

Since F1(t) and F2(t) are unspecified (ungiven) functions, solutions u1,u2 which we seek, will be depended on  F1(t) and F2(t). 

 

Thanks for your valuable and praiseworthy suggestions and comments.

When one uses the PolynomialIdeals package, then how should he ask the elemnts in an ideal or the number of generators?

An idea can be writing a proc getting a polynomialideal and returning a list with the generators as its elements in this way. Converting the polynomialideal to a list, then deleting its three last entries. But I'm wondering if there is any other way to do this? It's reasonable to be able to ask generators of an ideal of result of some computations in polynomialideal package.

 

Dear Maple users,

I want to label Y axis such that it doesn't encroach the numbers. The figure below illustrates the difficulty I am facing. How can I change the default setting to put letter '\bar{U}' at some distance from Y axis so that it doesn't look crowded? Thanks.

Edit. One crude way to do this is by using typesetting command.

labels = [log(n), typeset(conjugate(U), " ")]

 

i am trying to write the differential equation 

u_{t}=u_{xx}+2u^{2}(1-u) in my maple 15. 

but it shows error,

Error, empty number and  1 additional error.
 

I'm trying to program a procedure that will return me a list of positions defining equally spaced points (planets) around a circumference, for example:
PSI := [0, Pi]; # Location of 2 planets
PSI := [0, ((2/3)*Pi) , ((4/3)*Pi) ]; # For 3 Planets
I'm new to maple so most commands are new to me, I tried building the size of the list with [0 $ n] because I want the first position to always be at 0 degrees. The first problem is that I get this error:

Error, reserved word `for` unexpected

 

nplanets := 2;

2

(1)

make_PSI :=
proc(nplanets);
local n,psin,i,PSI:
n = nplanets;
psin  :=(pi*2)/n;
PSI := [0 $ n];
for i from 1 to n do
 angle :=(psin*i);
 op(i,PSI) := angle;
end do;
end;

 

 

Error, reserved word `for` unexpected

 


Any advice would be appreciated!

Download planetspace.mw

If I let Maple be running on the computer for a while, maybe a day or 2 or so, I almost certainly get a change of several

characters. See my favourite palette:

 

 

As you can see the eternity sign e.g changes to a big N. If I rerun the worksheet everything works ok except for the change of characters.

Not seen above: :=  changes to d

Remedy?

 

First 956 957 958 959 960 961 962 Last Page 958 of 2428