MaplePrimes Questions

Hi everyone.

I'm trying to visualize some some field lines for a 3D magnetic field I have simulated, and I have read that the Student[VectorCalculus] package is the best package for this type of visualization. I tried implementing it as described online and in the manual, and I got an error:

Error, (in plots/fieldplot3d) no non-zero vectors found

 

Does anyone have any ideas as to what could be causing this issue?

Attached is the Maple document I am using. The section entitled "Problem Area" is where the issue is.

 

turtle-rec-bend.mw

Dear all,

I need your help.

I compute the exact solution u(x,y,t) os PDE.
My code : PDEs.mw

I would like to plot the exact solution of my PDE.

My method work well but  when I put a:=1; b:=1; In the next lines there is no change, always I have a and b in my equation.

If i fix the time, "t=1 or 2 " for example; In the last lines i plot( u(x,y,2)); but doesn't work also.

Then animation in "t" how....

Thanks for your help.

 

 

 

Dear All

Please help me for using fsolve

the fsolve command doesnt work!

> restart;
> with(LinearAlgebra); Digits := 20;
print(`output redirected...`); # input placeholder
> Z := Matrix(2); N := 3; y11 := sum(a[n]*x^n, n = 0 .. N); y12 := sum(b[n]*x^n, n = 0 .. N); y21 := sum(c[n]*x^n, n = 0 .. N); y22 := sum(d[n]*x^n, n = 0 .. N); y11 := unapply(y11, x); y12 := unapply(y12, x); y21 := unapply(y21, x); y22 := unapply(y22, x);
print(`output redirected...`); # input placeholder
> A := linalg[matrix](2, 2, [1, -1, 1, exp(x)]); B := linalg[matrix](2, 2, [-3*exp(-x)-1, 2-2*exp(-x), -3*exp(-x)-2, 1-2*cosh(x)]);
print(`output redirected...`); # input placeholder
> C := eval(B, [x = 1]);
print(`output redirected...`); # input placeholder
> Y := linalg[matrix](2, 2, [y11(x), y12(x), y21(x), y22(x)]);
print(`output redirected...`); # input placeholder
> yy11 := diff(y11(x), x); yy12 := diff(y12(x), x); yy21 := diff(y21(x), x); yy22 := diff(y22(x), x); yy11 := unapply(yy11, x); yy12 := unapply(yy12, x); yy21 := unapply(yy21, x); yy22 := unapply(yy22, x);
> YY := linalg[matrix](2, 2, [yy11(x), yy12(x), yy21(x), yy22(x)]);
print(`output redirected...`); # input placeholder
> S := {seq(eval(YY, [x = n/N])-(eval(A, [x = n/N]))*(eval(Y, [x = n/N]))-(eval(B, [x = n/N])) = Matrix(2), n = 1 .. N)};
print(`output redirected...`); # input placeholder
> S1 := {eval(Y, [x = 0]) = linalg[matrix](2, 2, [3, 0, 1, 1])};
print(??); # input placeholder
> SS := `union`(S, S1);
print(??); # input placeholder
> sol := fsolve(SS);

 

I am new user of Maple. I have an expression like f(x,y)/g(x,y) and I want to have Maple name f(x,y) as something simple like "h" so that later equations write h/g(x,y) instead of the complete f(x,y)/g(x,y), and also to be able to simplify other equations in terms of h.

For example, a=(x+1)(y-5)^2/(x+y-3). Can I get Maple to let h=(x+1)(y-5)^2, so that I get h/(x+y-3) when I ask for a?

Sorry if this question is basic (and my math terminology incorrect), but I have been trying for a while.


firstly apologies in advance for stuff in this question such as "triangle symbol",  my computer is pretty old. 


ok so i was confused a bit here, what i'm trying to do is write a maple procedure that computes Af for a given f contained in V . except we only need to correct the bug in the script below. This script demonstrates such a procedure in the case that omega is a square. The domain is given here as the negative set of a function F contained in V .  I have left in notes where/what i think we need to do but i dunno how to...

N:=10 ; # Global Var
F:=(x,y)->sgn(abs(x-N/2)+abs(y-N/2)-N/4);
Average := proc(F, f0) local f, i, j;
f := f0; # !!!!!!!!!!!!!! something is bad here...
for i to N do for j to N do
if F(i, j) < 0 then
f[i, j] := (f0[i - 1, j] + f0[i + 1, j] + f0[i, j + 1] + f0[i, j - 1])/4 ;
end if;
end do;end do;
return f;
end proc;
f0:=Matrix(N,F); # just to have something to test the procedure
Average(F,f0); # does not return the expected average, modifies f0

 

the necessary information we were given to produce this so far was..

Let N be a positive integer and [N] = {i contained in N | 1<= i <=N }  Let "Omega" C {(i,j) contained in [N] x [N] | 2<=i,j<=N-1} be a subset. Let V = R^([N]x[N]) be the vector space of real valued functions [N]x[N] -> R
and A, "triangle symbol":V->V (average) and "triangle symbole" (Laplacian) be the linear maps such that
[Af](i; j) = f(i; j)      if (i; j) not contained in "Omega"   OR

                             [f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 if (i,j) is contained in "Omega"

["traingle symbol"f](i,j) =  0 if (i,j) isnt contained in "Omega"   OR

                            ( f(i,j) - [f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 )    if (i,j) is contained in "Omega"

 Please and thank you for any help in advance <3

                           

Hello,

Maple needs 827 characters to write a equation of a straight line.
Is that true or what am I doing wrong?   

Can anybody help me or give a direction to handle with such problems?

Putting
  assume(2<alpha , alpha<=4);about (alpha);
before it does not help either.

f:=-(6*(3*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4-12*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3-6*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4+16*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+24*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3+3*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4-8*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))/(alpha-1)-24*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2-12*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3+8*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+8*alpha+(8*(alpha-1+sqrt(alpha^2-3*alpha+2)))/(alpha-1)-7))/(alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2-2*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))/(alpha-1)-(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+(2*(alpha-1+sqrt(alpha^2-3*alpha+2)))/(alpha-1)-1)^4;

Hello,

• Is there a simple way to find the domain for the real solutions of f(x)?

• And is there a way to let maple get the part of f(x) with the sqrt?
   (not by typing it by hand as I dit below)

• Is there a way to write the summary of the found domains in one line?

Thanks for your help. 





restart:
# How to find the Domain for real solutions for x?
f(x):=(x-1+sqrt(x^2-3*x+2))/(x-1);
discont_for_x=discont(f(x),x);
# x<>+1 (because the de denom=0 is not allowed)
denom(f(x))=0;
x={solve(denom(f(x))=0,x)};
# x<=1 union  2<=x (because the part under the sqrt must be >=0 to give Real solutions)
sqrt(x^2-3*x+2);
0<=x^2-3*x+2;
x=solve(0<=x^2-3*x+2,x);




Hi all

 

Please, I'd like to clarify some basic points about performing computations in Maple 18. Up to now I have been doing some numeric calcs using matrices normally composed of 10 to 15 columns and 200 to 600 rows.

 

When doing the calcs with a matrix of ~200 rows, it is just ok but as the number of rows increase the calculation speed reduces significantly.

 

The data contained in each row is calculated within a loop cycle (i.e.: for i from 1 to 200 do ......).

 

The number of rows is controlled by a slider so when I drag the slider the calcs are automatically updated and the results shown graphically.

 

As I said it is too slow so I don't know if I should be looking into the option of doing calcs symbolically first? However you can't use symbolic notation when working with matrices. I still got a lot of calcs to do but prefer not to continue as it will only get slower so better to see if I can optimise speed.

 

Any comment is trully appreciated.

 

Regards

Cesar


m 18 cubacuhre integration fail, intergrand unknown

restartprintlevel = 3binomial(7, 2); with(StringTools); FormatTime(%c)with(LinearAlgebra); with(IntegrationTools)with(numapprox); with(OrthogonalSeries); LinearAlgebra:-HermitianTranspose(3-I*7)infolevel[`evalf/int`] := 4; pie = evalf(Pi)n = 1l = 0m = 0n1 = 1l1 = 0m1 = 0alpha = 5.8alpha1 = 4.2R = .5Theta = (1/6)*PiPhi = 3*Pi*(1/4)region := [r = 0 .. infinity, theta = 0 .. Pi, phi = 0 .. 2*Pi]r1 := proc (r, theta, phi, R, Theta, Phi) options operator, arrow; (r^2+R^2-2*r*R*(sin(theta)*sin(Theta)*cos(phi-Phi)+cos(theta)*cos(Theta)))^(1/2) end proc"coef:=(l1,l2,m1,m2)->(-1)^(l1-l2) (((4 *pie *(2 l1+1)!)/((2 l1-2 l2+1)!*(2 l2+1)!))*("
"(binomial(l1+m1,l2+m2)*binomial(l1-m1,l2m2))/(binomial(2* l1,2* l2)))())^(1/(2));NN:=(n,alpha)->((2 alpha)^(n+(1)/(2)))/(((2 n)!)^((1)/(2)));  "

integrand := sum(sum(R^(l1-l2)*SphericalY(l1-l2, m1-m2, Theta, Phi)*coef(l1, l2, m1, m2)*r^(2+l+l2)*SphericalY(l2, m2, theta, phi)*LinearAlgebra:-HermitianTranspose(SphericalY(l, m, theta, phi))*NN(n, alpha)*r^(n-l-1)*exp(-alpha.r)*NN(n1, alpha1)*r1(r, theta, phi, R, Theta, Phi)^(n1-l1-1)*exp(-alpha1*r1(r, theta, phi, R, Theta, Phi))*sin(theta), m2 = -l2 .. l2), l2 = 0 .. l1)

evalf(Int(integrand, region, 'epsilon' = 0.1e-3, 'method = _CubaCuhre'));
``NULL

binomial(7, 3)region4 := [x = 0 .. 10*Pi, y = 0 .. 10*Pi]

integrand4 := (cos(x)+(1/3)*sin(y))^6*(sin(y)-(1/3)*cos(x))^2

evalf(Int(integrand4, region4, 'epsilon' = 0.1e-3, 'method = _CubaCuhre'))

NULL

NULL

 

Download stovrlp2.mw

m 18 cubacuhre integration fail, intergrand unknown

 

 

Hi, as the title says I am animating an implicitplot and want a different color for each curve left by the trace. I realize it may be easier to build plot structures using seq and display(..,insequence=false) but I thought I should learn more Maple ha ha. Plus  it seems easier to implement.

 Forgot to say I use Maple 15

For equation sol[2][1]=constant A,

 

 

> animate(implicitplot, [sol[2][1] = A, x = -6 .. 15, y = -15 .. 15, numpoints = 10^5], A = -10 .. 10, trace = 2, frames = 20);

 

 

Hi all

In matlab software we have a command namely fmincon which minimizes any linear/nonlinear algebric equations subject to linear/nonlinear constraints.

Now my question is that: what is the same command in maple?or how can we minimize linear/nonlinear function subject to linear/nonlinear constraints in maple?

thanks a lot

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi all,
I need to find mina(w) then a=-1,0,1 and

w := piecewise((x-a)/t <= -10, 202*a-200*x-(202001/101)*t, (x-a)/t <= -910/101, 3*a-x-(1011/101)*t, (x-a)/t <= 910/101, 2*a-t, (x-a)/t <= 10, a+x-(1011/101)*t, 10 < (x-a)/t, -198*a+200*x-(202001/101)*t)

Also need to plot it, i think it should look like this 

Thanks

 

 

 

I am getting a complex solution for a physical quantity, how can I plot it. Should I plot the real part or modulus?

solution is,

C1*sqrt(4*tau^2*M^2*lambda^2+Q^2)*LegendreP((1/2*I)*sqrt(7)-1/2, I*sqrt(7), (2*I)*lambda*M*tau/Q)+C2*sqrt(4*tau^2*M^2*lambda^2+Q^2)*LegendreQ((1/2*I)*sqrt(7)-1/2, I*sqrt(7), (2*I)*lambda*M*tau/Q)

 

where C1 and C2 are integration constants.

Perhaps I am being daft, but to me the Physics package seems, quite surprisingly, to have trouble multiplying by a nonzero, non-square matrix. The test code

restart:
with(Physics):
Matrix(2,2,fill = 0) . Vector(2),
Matrix(2,2,fill = 1) . Vector(2),
Matrix(2,3,fill = 0) . Vector(3);
Matrix(2,3,fill = 1) . Vector(3);

produces the following output:

Error, (in Vector[column]) Matrix index out of range

i.e., the last expression cannot be evaluated; while the test code (where no loading of the Physics package is performed)

restart:
#with(Physics):
Matrix(2,2,fill = 0) . Vector(2),
Matrix(2,2,fill = 1) . Vector(2),
Matrix(2,3,fill = 0) . Vector(3),
Matrix(2,3,fill = 1) . Vector(3);

produces the following expected output:

PS: To be sure, I have from http://www.maplesoft.com/products/maple/features/physicsresearch.aspx downloaded the latest version (2014, March 19, 4:0 hours) of the Physics package for Maple 17 (the version I am running).

Please i don't want to convert from list to set then apply set minus and convert back because it loses its order and repititions.

 

so i want something that can for example do the following:

list_minus([1,2,4,6,2,1,3,6,2],[7,4,2,5,2]) = [1,6,1,3,6,2]

so it removes repititions from left and order is retained.

First 1444 1445 1446 1447 1448 1449 1450 Last Page 1446 of 2429