Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


I am trying to simplify the last expression, it has assumptions in it. The numerator is a negative of the denominator so I am trying to get 1, Please help.

The plots at the end of the following code output the lines when the textplot is absent - but with the textplot the lines are omitted.  Am puzzled as to why this is happening.  Square_areas.mws  Square_areas.txt

Any help gratefully received.  David

 

restart:
 # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Areas of portions of a square 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 with(plots):
 with(plottools):
 side:=6:A1:=16:A2:=20:A3:=32:
 # Pick a point in the square: say (x1, y1)
 poinC:=point([side/4,side/3]):
 cpoin:=op(1,%):
 x1:=cpoin[1];
 y1:=cpoin[2];
 lin[1]:=line([side/2,0],[x1,y1], color=black):
 lin[2]:=line([0,side/2],cpoin, color=black):
 lin[3]:=line([side/2,side],cpoin, color=black):
 lin[4]:=line([side,side/2],cpoin, color=black):
 #textA:=textplot([(cpoin[1]+side/2)/2,1,`A1`],align={ABOVE,RIGHT}):
 #textA:=textplot([(1.5+side/2)/2,1,`A1`]):
 tetA:=textplot([1,1.3,`A1`]):
 
 squ:= polygon([[0,0], [0,side], [side,side],[side,0]], color=white):
 # Plot without tetA - Lines are given
 plots[display]({seq(lin[i],i=1..4),squ,poinC}, scaling=constrained,axes=normal);
 # Plot with tetA - Lines are not given
 plots[display]({seq(lin[i],i=1..4),squ,tetA,poinC}, scaling=constrained,axes=normal);
 # Plot with tetA (placed  differently) - Lines are not given
 plots[display]({squ,poinC,tetA,lin[1],lin[2],lin[3],lin[4]}, scaling=constrained,axes=normal);

I updated a few days ago my Maple's version to 2018 (instead of 2017).

Unfortunatelly, since then I couldn't run Matlab code that uses Maple's engine (it worked fine before the update). I can't run any code that uses symbols.

I tried to follow this link:

https://www.maplesoft.com/support/downloads/mtm1102_installation.aspx

but I don't see the file "MapleToolboxforMATLABUpgrade_Windows.exe" anywhere.

Can anyone suggest what I can do to make it work?

I have Maple 2018 and Matlab 2017 if it matters.

Thanks

How can I resolve the following error message? More specifically, how do I set up a coordinate system different from cartesian, spherical, etc in order to pass it to the metric? 

 

restart;
with(Physics);

Setup(mathematicalnotation = true);
                 [mathematicalnotation = true]
Setup(signature = `+---`);
                     [signature = + - - -]

ds2 := [(x^2-y^2)*cos(2*u)+2*x*y*sin(2*u)]*(du^2)-2*x*(dv^2)-dx^2-dy^2;
Setup(coordinates = (Z = [u, v, x, y], metric = ds2));
* Partial match of  'coordinates' against keyword 'coordinatesys\

  tems'
Error, (in Physics:-Setup) expected a list with 4 names, where 4 is the spacetime dimension, or one of the keywords cartesian, spherical, cylindrical; received: ds2

When I used fsolve command for a system of the nonlinear algebraic equation, the result will be one set of solution

for example:

f := x+2*y = 3;
g := y+1/x = 1;
fsolve({f, g});
              {x = 2.000000000, y = 0.5000000000}

 

where when we use the solve command

we will get

solve({f, g});
                                
               {x = -1, y = 2}, { x = 2, y = 0.5 }.

The question is:  why fsolve command give the values of x and y (x=2 and y=0.5 ) and ignore ({x = -1, y = 2})?

why didnt give ({x = -1, y = 2}). and ignore (x=2 and y=0.5 )?
                                


 

Help page says "minus~" is an element-wise operators in Maple
Why this command doesn't return [{1}, {3}] but generates an error ?
[{1, 2}, {2, 3}] minus~ {2};
Error, dimension bounds must be the same for all container objects in an elementwise operation

OK, you can answer I could use  map(u -> u minus {2}, [{1, 2}, {2, 3}]), but it wouldn't explain the reason of the (my?) error.

Thanks in advance

 

 

 

duaxisplot([x=1,x=2,x=3], ....);

just want to plot multiple vertical line with a time series at the same time

How could one tell Maple to simplify  log(x)+log(y) to log(x*y)?

As Maple own apps says  https://www.maplesoft.com/support/help/maple/view.aspx?path=MathApps%2FProductRuleForLogarithms

And known identity  https://en.wikipedia.org/wiki/List_of_logarithmic_identities

 

This is what I tried

restart;
simplify( ln(x) + ln(y), symbolic);
simplify( ln(x) + ln(y), ln);
simplify( ln(x) + ln(y), size);

Maple knows this identity, becuase

simplify( ln(x*y)- (ln(x)+ln(y)) , symbolic)
       0

Note, this identity has no assumptions on it. It is defined as is.

Maple help page says

ln(x y) ==> ln(x) + ln(y) provided     0 < x  and   signum(y) is unknown

so, is Wikipedia and all the other references I saw wrong for not showing this assumption on x>0 whey they state the product rule for logs?

I want to go the other way

 ln(x) + ln(y) ==> ln(x y) 

So this releation should really be written as

ln(x) + ln(y) <==> ln(x y) 

 

How could I substitute the (t1*e) into t2 at the index of e?  I am trying many ways to do that, but it doesn't work. please help me.
 

restart:

alias(epsilon = e, omega = w, omega[0] = w0, t[1] = t1, t[2] = t2, alpha[1] = a1, alpha[2] = a2, alpha[3] = a3, beta[1] = b1, beta[2] = b2, F[0] = f0); e := proc (t1, t2) options operator, arrow; e end proc; w0 := proc (t1, t2) options operator, arrow; w0 end proc; a := proc (t1, t2) options operator, arrow; a end proc; f := proc (t1, t2) options operator, arrow; f end proc; mu := proc (t1, t2) options operator, arrow; mu end proc

 

 

(1/8)*alpha[2](t[1], t[2])*b^3*exp((3*I)*omega*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp(-(3*I)*omega*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp((3*I)*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-(3*I)*t[1])+3*alpha[2](t[1], t[2])*b^3*exp(-I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*b^3*exp(I*omega*t[1])*(1/8)-I*alpha[1](t[1], t[2])*A(t[2])*exp(-I*t[1])*(1/2)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*omega*t[1])*(1/4)-I*(diff(A(t[2]), t[2]))*exp(-I*t[1])+3*alpha[2](t[1], t[2])*A(t[2])*exp(-I*t[1])*b^2*(1/4)-I*alpha[1](t[1], t[2])*b*omega*exp(-I*omega*t[1])*(1/2)+I*alpha[1](t[1], t[2])*b*omega*exp(I*omega*t[1])*(1/2)+3*alpha[2](t[1], t[2])*A(t[2])^3*exp(-I*t[1])*(1/8)+I*(diff(A(t[2]), t[2]))*exp(I*t[1])+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]-(2*I)*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]+(2*I)*omega*t[1])*(1/8)+q[1](t[1], t[2])+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]-I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])^3*exp(I*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]+I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]-(2*I)*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]+(2*I)*omega*t[1])*(1/8)+diff(q[1](t[1], t[2]), t[1], t[1])+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]-I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]+I*omega*t[1])*(1/8)+I*alpha[1](t[1], t[2])*A(t[2])*exp(I*t[1])*(1/2)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*omega*t[1])*(1/4)+3*alpha[2](t[1], t[2])*A(t[2])*exp(I*t[1])*b^2*(1/4);

(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*omega*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(-I*t[1])*b^2+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]-(2*I)*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]+(2*I)*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]-I*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]+I*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]-(2*I)*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]+(2*I)*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]-I*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]+I*omega*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*omega*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(I*t[1])*b^2-((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(-I*t[1])+((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(I*t[1])+I*(diff(A(t[2]), t[2]))*exp(I*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp((3*I)*omega*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp(-(3*I)*omega*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp((3*I)*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-(3*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*b^3*exp(-I*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*b^3*exp(I*omega*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(I*t[1])-I*(diff(A(t[2]), t[2]))*exp(-I*t[1])+((1/2)*I)*alpha[1](t[1], t[2])*b*omega*exp(I*omega*t[1])-((1/2)*I)*alpha[1](t[1], t[2])*b*omega*exp(-I*omega*t[1])+diff(diff(q[1](t[1], t[2]), t[1]), t[1])+q[1](t[1], t[2])

(1)

 

 

eq:=combine(subs(w=3+e*sigma,%),exp);

(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(-I*t[1])*b^2+(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(I*t[1])*b^2-((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(-I*t[1])+((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(I*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]-(2*I)*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]+(2*I)*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]-I*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]+I*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]-(2*I)*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]+(2*I)*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]-I*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]+I*(epsilon*sigma+3)*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*(epsilon*sigma+3)*t[1])+I*(diff(A(t[2]), t[2]))*exp(I*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp((3*I)*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-(3*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(I*t[1])-I*(diff(A(t[2]), t[2]))*exp(-I*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp((3*I)*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*b^3*exp(I*(epsilon*sigma+3)*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp(-(3*I)*(epsilon*sigma+3)*t[1])+(3/8)*alpha[2](t[1], t[2])*b^3*exp(-I*(epsilon*sigma+3)*t[1])+((1/2)*I)*alpha[1](t[1], t[2])*b*(epsilon*sigma+3)*exp(I*(epsilon*sigma+3)*t[1])-((1/2)*I)*alpha[1](t[1], t[2])*b*(epsilon*sigma+3)*exp(-I*(epsilon*sigma+3)*t[1])+diff(diff(q[1](t[1], t[2]), t[1]), t[1])+q[1](t[1], t[2])

(2)

expand(%);

(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(I*t[1])*b^2+((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(I*t[1])+I*(diff(A(t[2]), t[2]))*exp(I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(I*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*(exp(I*t[1]))^3+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3/(exp(I*t[1]))^3+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3/exp(I*t[1])-I*(diff(A(t[2]), t[2]))/exp(I*t[1])+diff(diff(q[1](t[1], t[2]), t[1]), t[1])+q[1](t[1], t[2])+(1/8)*alpha[2](t[1], t[2])*b^3*(exp(I*epsilon*sigma*t[1]))^3*(exp(I*t[1]))^9+(3/8)*alpha[2](t[1], t[2])*b^3*exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3+(1/8)*alpha[2](t[1], t[2])*b^3/((exp(I*epsilon*sigma*t[1]))^3*(exp(I*t[1]))^9)+(3/8)*alpha[2](t[1], t[2])*b^3/(exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3)+(3/4)*alpha[2](t[1], t[2])*A(t[2])*b^2/exp(I*t[1])-((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])/exp(I*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b/(exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3)+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2/((exp(I*epsilon*sigma*t[1]))^2*(exp(I*t[1]))^7)+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*(exp(I*epsilon*sigma*t[1]))^2*(exp(I*t[1]))^5+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b/(exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^5)+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*epsilon*sigma*t[1])*exp(I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2/((exp(I*epsilon*sigma*t[1]))^2*(exp(I*t[1]))^5)+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*(exp(I*epsilon*sigma*t[1]))^2*(exp(I*t[1]))^7+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b/(exp(I*epsilon*sigma*t[1])*exp(I*t[1]))+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^5+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3+((3/2)*I)*alpha[1](t[1], t[2])*b*exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3-((3/2)*I)*alpha[1](t[1], t[2])*b/(exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3)+((1/2)*I)*alpha[1](t[1], t[2])*b*exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3*epsilon*sigma-((1/2)*I)*alpha[1](t[1], t[2])*b*epsilon*sigma/(exp(I*epsilon*sigma*t[1])*(exp(I*t[1]))^3)

(3)

eq:=combine(subs({e^(t1*e)=e^t2},%),exp);

(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(-I*t[1])*b^2+(3/4)*alpha[2](t[1], t[2])*A(t[2])*exp(I*t[1])*b^2-((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(-I*t[1])+((1/2)*I)*alpha[1](t[1], t[2])*A(t[2])*exp(I*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp((3*I)*t[1]*epsilon*sigma+(9*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*b^3*exp(I*epsilon*sigma*t[1]+(3*I)*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp(-(3*I)*t[1]*epsilon*sigma-(9*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*b^3*exp(-I*epsilon*sigma*t[1]-(3*I)*t[1])+I*(diff(A(t[2]), t[2]))*exp(I*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp((3*I)*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-(3*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(I*t[1])-I*(diff(A(t[2]), t[2]))*exp(-I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-(2*I)*epsilon*sigma*t[1]-(7*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp((2*I)*epsilon*sigma*t[1]+(5*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*epsilon*sigma*t[1]-(5*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*epsilon*sigma*t[1]+I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-(2*I)*epsilon*sigma*t[1]-(5*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])*b^2*exp((2*I)*epsilon*sigma*t[1]+(7*I)*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*epsilon*sigma*t[1]-I*t[1])+(3/8)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*epsilon*sigma*t[1]+(5*I)*t[1])+diff(diff(q[1](t[1], t[2]), t[1]), t[1])+q[1](t[1], t[2])+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*epsilon*sigma*t[1]-(3*I)*t[1])+(3/4)*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*epsilon*sigma*t[1]+(3*I)*t[1])+((3/2)*I)*alpha[1](t[1], t[2])*b*exp(I*epsilon*sigma*t[1]+(3*I)*t[1])-((3/2)*I)*alpha[1](t[1], t[2])*b*exp(-I*epsilon*sigma*t[1]-(3*I)*t[1])+((1/2)*I)*alpha[1](t[1], t[2])*b*epsilon*sigma*exp(I*epsilon*sigma*t[1]+(3*I)*t[1])-((1/2)*I)*alpha[1](t[1], t[2])*b*epsilon*sigma*exp(-I*epsilon*sigma*t[1]-(3*I)*t[1])

(4)

How could I substitute the (t1*e) into t2 at the index of e?  I am trying many ways to do that, but it doesn't work. please help me.   (t1*e)=t2


 

Download question.mw

Hi all

Hope the best for all. 

I have a single product of two sum, where the second sum admits one variable, namely j, from first one.

how can I it via maple?

thanks for any help.

I have a function g(x,t), which is the numerical result of a PDE.

How to calculate the function f (t), defined by:

f:=t->int(g(x,t),x=a..b)

I tried to calculate that way, but that did not work.

Thanks for the help.

 f(a)(x) = a*x mod 256  for all x in Z[256]

how can write this loop that has written in matlab to maple??
i=1;
for e=T1P1:0.0399:T1P;
    E(i)=e;
    gama1(i,:)=a-atan(e/Rb1);
     i=i+1;
end
 

First 776 777 778 779 780 781 782 Last Page 778 of 2218