MaplePrimes Questions

In this code, plot() and Norm() fail when used over a piecewise() function:

Error, invalid input: VectorCalculus:-Norm expects its 1st argument, v, to be of type {Matrix, Vector}, but received piecewise(t < 0, Vector[row](2, {(1) = -1, (2) = 0}, attributes = [coords = cartesian]), Vector[row](2, {(1) = 1, (2) = 0}, attributes = [coords = cartesian]))

Note that the same Norm() and piecewise() work fine when used without the plot() function:

Norm(vec(1));
                               1

Code works fine when piecewise() is removed, leaving a plot() / Norm() combination, for example:

So only the simultaneous combination plot() / Norm() / piecewise() fails. 

Finally, the question is:

Is there a way to plot Norm() / piecewise() combinations without workarounds like intermediate PLOT structures?

Thank you

plot(sin(x),x=-10..10)hello

I have an ODE plot like this and I want its horizontal axes to be in degree instead of radian, but I don't know how

 

NULLIn TEXT MODE the greek letters phi and varphi behave peculiarly in text entries inside text box in drawing. If it is the first letter it prints alright. Otherwise they rverse themselves (phi to varphi and viceversa). Is this solvable?

 

NULL

 

Download A_DOUBT_on_phi_varphi.mw


 


 

 

Ramakrishnan V

rukmini_ramki@hotmail.com

 

``

 

I would appreciate if anyone lets me know how to write circular references  (say 1 inside a circle to refer element 1. At present i do a drawing insert text and using.

 

Also i do not know how to remove the boundary of the overall drawing.

NULL

 

Download A_DOUBT_to_be_sent_to_prime_community.mw

Ramakrishnan V

rukmini_ramki@hotmail.com

m1 := <Old_Asso_eigenvector[2][1][1],Old_Asso_eigenvector[2][1][2],Old_Asso_eigenvector[2][1][3]>;
m2 := <Old_Asso_eigenvector[2][2][1],Old_Asso_eigenvector[2][2][2],Old_Asso_eigenvector[2][2][3]>;
m3 := <Old_Asso_eigenvector[2][3][1],Old_Asso_eigenvector[2][3][2],Old_Asso_eigenvector[2][3][3]>;

m1 := <Old_Asso_eigenvector[2][1][1],Old_Asso_eigenvector[2][2][1],Old_Asso_eigenvector[2][3][1]>;
m2 := <Old_Asso_eigenvector[2][1][2],Old_Asso_eigenvector[2][2][2],Old_Asso_eigenvector[2][3][2]>;
m3 := <Old_Asso_eigenvector[2][1][3],Old_Asso_eigenvector[2][2][3],Old_Asso_eigenvector[2][3][3]>;
ord := GramSchmidt([m1, m2, m3]);
ord := Basis([m1, m2, m3]);

ord[1].ord[2];  # expect = 1
ord[1].ord[3];  # expect = 1
ord[2].ord[1];  # expect = 1
ord[2].ord[3];  # expect = 1
ord[3].ord[1];  # expect = 1
ord[3].ord[2];  # expect = 1

is there a function get orthonormal basis ?

Why i cant get a final answer?

phi := -(1/2)*x^2+2*cos((3.14*(1/20))*x)*(c__1*cosh((3.14*(1/20))*y)+c__2*sinh((3.14*(1/20))*y)+c__3*y*cosh((3.14*(1/20))*y)+c__4*y*sinh((3.14*(1/20))*y));

-(1/2)*x^2+2*cos(.1570000000*x)*(c__1*cosh(.1570000000*y)+c__2*sinh(.1570000000*y)+c__3*y*cosh(.1570000000*y)+c__4*y*sinh(.1570000000*y))

(1)

diff(phi, x, x);``

 

-1-0.4929800000e-1*cos(.1570000000*x)*(c__1*cosh(.1570000000*y)+c__2*sinh(.1570000000*y)+c__3*y*cosh(.1570000000*y)+c__4*y*sinh(.1570000000*y))

(2)

-1-0.4929800000e-1*cos(.1570000000*x)*(c__1*cosh(.1570000000*y)+c__2*sinh(.1570000000*y)+c__3*y*cosh(.1570000000*y)+c__4*y*sinh(.1570000000*y)) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0)

-1-0.4929800000e-1*cos(.1570000000*x)*(`#msub(mi("c"),mi("1"))`*cosh(.1570000000*y)+`#msub(mi("c"),mi("2"))`*sinh(.1570000000*y)+`#msub(mi("c"),mi("3"))`*y*cosh(.1570000000*y)+`#msub(mi("c"),mi("4"))`*y*sinh(.1570000000*y)) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0)

(3)

eval(-1-0.4929800000e-1*cos(.1570000000*x)*(c__1*cosh(.1570000000*y)+c__2*sinh(.1570000000*y)+c__3*y*cosh(.1570000000*y)+c__4*y*sinh(.1570000000*y)) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0), y = .75);

-1-0.4929800000e-1*cos(.1570000000*x)*(1.006940545*`#msub(mi("c"),mi("1"))`+.1180222905*`#msub(mi("c"),mi("2"))`+.7552054088*`#msub(mi("c"),mi("3"))`+0.8851671788e-1*`#msub(mi("c"),mi("4"))`) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0)

(4)

eval(-1-0.4929800000e-1*cos(.1570000000*x)*(c__1*cosh(.1570000000*y)+c__2*sinh(.1570000000*y)+c__3*y*cosh(.1570000000*y)+c__4*y*sinh(.1570000000*y)) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0), y = -.75);

-1-0.4929800000e-1*cos(.1570000000*x)*(1.006940545*`#msub(mi("c"),mi("1"))`-.1180222905*`#msub(mi("c"),mi("2"))`-.7552054088*`#msub(mi("c"),mi("3"))`+0.8851671788e-1*`#msub(mi("c"),mi("4"))`) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0)

(5)

NULL

diff(-phi, x, y);

.3140000000*sin(.1570000000*x)*(.1570000000*c__1*sinh(.1570000000*y)+.1570000000*c__2*cosh(.1570000000*y)+c__3*cosh(.1570000000*y)+.1570000000*c__3*y*sinh(.1570000000*y)+c__4*sinh(.1570000000*y)+.1570000000*c__4*y*cosh(.1570000000*y))

(6)

eval(.3140000000*sin(.1570000000*x)*(.1570000000*c__1*sinh(.1570000000*y)+.1570000000*c__2*cosh(.1570000000*y)+c__3*cosh(.1570000000*y)+.1570000000*c__3*y*sinh(.1570000000*y)+c__4*sinh(.1570000000*y)+.1570000000*c__4*y*cosh(.1570000000*y)), y = -.75);

.3140000000*sin(.1570000000*x)*(-0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3-.2365895397*c__4)

(7)

.3140000000*sin(.1570000000*x)*(-0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3-.2365895397*c__4) = 0;

.3140000000*sin(.1570000000*x)*(-0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3-.2365895397*c__4) = 0

(8)

eval(.3140000000*sin(.1570000000*x)*(.1570000000*c__1*sinh(.1570000000*y)+.1570000000*c__2*cosh(.1570000000*y)+c__3*cosh(.1570000000*y)+.1570000000*c__3*y*sinh(.1570000000*y)+c__4*sinh(.1570000000*y)+.1570000000*c__4*y*cosh(.1570000000*y)), y = .75);

.3140000000*sin(.1570000000*x)*(0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3+.2365895397*c__4)

(9)

.3140000000*sin(.1570000000*x)*(0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3+.2365895397*c__4) = 0;

.3140000000*sin(.1570000000*x)*(0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3+.2365895397*c__4) = 0

(10)

s := solve({.3140000000*sin(.1570000000*x)*(-0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3-.2365895397*c__4) = 0, .3140000000*sin(.1570000000*x)*(0.1852949961e-1*c__1+.1580896656*c__2+1.020837670*c__3+.2365895397*c__4) = 0, -1-0.4929800000e-1*cos(.1570000000*x)*(1.006940545*c__1-.1180222905*c__2-.7552054088*c__3+0.8851671788e-1*c__4) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0), -1-0.4929800000e-1*cos(.1570000000*x)*(1.006940545*c__1+.1180222905*c__2+.7552054088*c__3+0.8851671788e-1*c__4) = piecewise(-5 < x and x < 5, -1, -10 < x and x < -5, 5 < x and x < 10, 0)}, {c__1, c__2, c__3, c__4});

{`#msub(mi("c"),mi("1"))` = -(20.28463654*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))/cos(.1570000000*x), `#msub(mi("c"),mi("2"))` = 0., `#msub(mi("c"),mi("3"))` = 0., `#msub(mi("c"),mi("4"))` = (1.588676174*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))/cos(.1570000000*x)}

(11)

phi1 := subs({c__1 = -20.28463654*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.)/cos(.1570000000*x), c__2 = 0., c__3 = 0., c__4 = 1.588676174*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.)/cos(.1570000000*x)}, phi);

-(1/2)*x^2+2*cos(.1570000000*x)*(-(20.28463654*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*cosh(.1570000000*y)/cos(.1570000000*x)+(1.588676174*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*y*sinh(.1570000000*y)/cos(.1570000000*x))

(12)

syy1 := diff(phi1, x, x);

-1-0.4929800000e-1*cos(.1570000000*x)*(-(20.28463654*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*cosh(.1570000000*y)/cos(.1570000000*x)+(1.588676174*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*y*sinh(.1570000000*y)/cos(.1570000000*x))-.6280000000*sin(.1570000000*x)*(-20.28463654*(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x))*cosh(.1570000000*y)/cos(.1570000000*x)-(3.184687937*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*cosh(.1570000000*y)*sin(.1570000000*x)/cos(.1570000000*x)^2+1.588676174*(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x))*y*sinh(.1570000000*y)/cos(.1570000000*x)+(.2494221593*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*y*sinh(.1570000000*y)*sin(.1570000000*x)/cos(.1570000000*x)^2)+2*cos(.1570000000*x)*(-20.28463654*(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x, x))*cosh(.1570000000*y)/cos(.1570000000*x)-6.369375874*(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x))*cosh(.1570000000*y)*sin(.1570000000*x)/cos(.1570000000*x)^2-(.9999920122*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*cosh(.1570000000*y)*sin(.1570000000*x)^2/cos(.1570000000*x)^3-(.4999960061*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*cosh(.1570000000*y)/cos(.1570000000*x)+1.588676174*(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x, x))*y*sinh(.1570000000*y)/cos(.1570000000*x)+.4988443186*(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x))*y*sinh(.1570000000*y)*sin(.1570000000*x)/cos(.1570000000*x)^2+(0.7831855802e-1*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*y*sinh(.1570000000*y)*sin(.1570000000*x)^2/cos(.1570000000*x)^3+(0.3915927901e-1*(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.)+1.))*y*sinh(.1570000000*y)/cos(.1570000000*x))

(13)

"(->)"

-1.-2.*10^(-9)*(eval(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x), x = 1))-40.56959712*(eval(diff(piecewise(-5. < x and x < 5., -1., -10. < x and x < -5., 5. < x and x < 10., 0.), x, x), x = 1))

(14)

``

 

Download case5analytic.mw

Hello,

I would like to know how to order a sequence of number from smallest to largest. This is if I have both real and imaginary numbers. Any help would be rgeatly appreciated! Thank you in advance.

Kind regards,

Gamiba Man

I'm solving a problem described in this topic.

It's sufficient for me to obtain N variable via this manual procedure: file4.mw

However when I want to quantify an expression (f) for any N (e.g. N=40), Maple shows a value with some I variable:

screen

What does it mean?

I'm trying to calculate flux through a cone but gets the following:

Flux(VectorField(`<,>`(x, y, z), cartesian[x, y, z]), Surface(`<,>`(x,y,z), x^2+y^2<=2*a,z = 2*a-sqrt(x^2+y^2)))
Error, (in VectorCalculus:-Flux) error with surface input

HeunTPrime.mw

 

Hi all,

I hope the best for every of you...

I wonder how it can be possible to plot this function (HeunTPrime) in Maple18???

Thanks a lot

Hi, i need to plot n(celle) versus vavg, is it possible? i have tried a lot of different things without luck.

navg is in the range between 0-10

ts is between 0-100

Hope one of you can help me!

Thanks

 

 

 

equ1 := -l*cos(gamma)^2*(1-cos(`&beta;__f`))/(alpha^2*sin(sigma))-`&lambda;__2`*w*v^2*sin(sigma)/(g*lcos(gamma)^2) = 0

-l*cos(gamma)^2*(1-cos(`&beta;__f`))/(alpha^2*sin(sigma))-`&lambda;__2`*w*v^2*sin(sigma)/(g*lcos(gamma)^2) = 0

(1)

equ2 := -l*cos(gamma)^2*(1-cos(beta[f]))/(alpha*sin(sigma)*tan(sigma))+l*cos(gamma)^2*z__0*sin(`&beta;__f`)/(alpha*sin(sigma)*(2*l*cos(sigma)^2))-`&lambda;__1`*`#mi("L")`*sin(sigma)*cos(gamma)+`&lambda;__2`*L*cos(sigma)*cos(gamma)-`&lambda;__2`*`w&alpha;`*v^2*sin(sigma)/(g*l*tan(sigma)*cos(gamma)^2) = 0

-l*cos(gamma)^2*(1-cos(beta[f]))/(alpha*sin(sigma)*tan(sigma))+(1/2)*cos(gamma)^2*z__0*sin(`&beta;__f`)/(alpha*sin(sigma)*cos(sigma)^2)-`&lambda;__1`*`#mi("L")`*sin(sigma)*cos(gamma)+`&lambda;__2`*L*cos(sigma)*cos(gamma)-`&lambda;__2`*`w&alpha;`*v^2*sin(sigma)/(g*l*tan(sigma)*cos(gamma)^2) = 0

(2)

equ3 := l*cos(gamma)^2*sin(`&beta;__f`)*tan(sigma)/(alpha*sin(sigma)*(2*l)) = 0

(1/2)*cos(gamma)^2*sin(`&beta;__f`)*tan(sigma)/(alpha*sin(sigma)) = 0

(3)

equ4 := -`&lambda;__1`*`#mi("L")`*cos(sigma)*sin(gamma)+`&lambda;__2`*L*sin(sigma)*sin(gamma)-2*`&lambda;__2`*tan(gamma)*`w&alpha;`*v^2*sin(sigma)/(g*lcos(gamma)^2)-l*sin(2*gamma)*(1-cos(beta[f]))/(alpha*sin(sigma)) = 0

-`&lambda;__1`*`#mi("L")`*cos(sigma)*sin(gamma)+`&lambda;__2`*L*sin(sigma)*sin(gamma)-2*`&lambda;__2`*tan(gamma)*`w&alpha;`*v^2*sin(sigma)/(g*lcos(gamma)^2)-l*sin(2*gamma)*(1-cos(beta[f]))/(alpha*sin(sigma)) = 0

(4)

equ5 := L*cos(sigma)*cos(gamma)-w = 0

L*cos(sigma)*cos(gamma)-w = 0

(5)

equ6 := `#mi("L")`*sin(sigma)*cos(gamma)-`w&alpha;`*v^2*sin(sigma)/(g*l*cos(gamma)^2)

`#mi("L")`*sin(sigma)*cos(gamma)-`w&alpha;`*v^2*sin(sigma)/(g*l*cos(gamma)^2)

(6)

answer := solve({equ1, equ2, equ3, equ4, equ5, equ6}, {alpha, gamma, sigma, `&lambda;__1`, `&lambda;__2`, beta[f]})

Error, (in solve) a constant is invalid as a variable, gamma

 

``


how can i solve this problem?

Download Bryson_sesson1_p6.mw

hello

I have recently install Maple17 on my computer (Windows10) and I need to use some Greece alphabet such as ß but I look everywhere in maple's icon and I just could find capital Greece alphabet.

does anybody know how can I find those?

Hello,

I'm having an issue with this and I can't seem to fix it. Any help is greatly appreciated! Thank you in advance!!! For some reason mapleprimes won't let me upload the worksheet so I have pasted it below this message.

 

Kind regards.

Gambia Man

with(LinearAlgebra); UseHardwareFloats; with(plots); interface(rtablesize = infinity); with(Statistics);
L := 4; U := 1;
V := proc (x, y) options operator, arrow; piecewise((1/4)*L <= x and x <= (1/2)*L and (1/4)*L <= y and y <= (1/2)*L, U) end proc;
plot3d(V(x, y), x = 0 .. L, y = 0 .. L);

Vij := proc (ni, mi, nj, mj) local Xi, Xj; option remember; global U, L; Xi := 2*sin(ni*evalf(Pi)*x/L)*sin(mi*evalf(Pi)*y/L)/L; Xj := 2*sin(nj*evalf(Pi)*x/L)*sin(mj*evalf(Pi)*y/L)/L; return U*(int(int(Xi*Xj, x = (1/4)*L .. (1/2)*L), y = (1/4)*L .. (1/2)*L)) end proc;
HamilMat := proc (K::integer) local ni, mi, nj, mj, N, Hamil, Eigenvec, i, j, res; option remember; global Vij, U, L; N := K^2; ni := Vector(N); mi := Vector(N); nj := Vector[row](N); mj := Vector[row](N); for i to N do for j to K do res := (i+K-j)/K; if type(res, integer) = true then ni[i] := j; nj[i] := j; mi[i] := res; mj[i] := res end if end do end do; Hamil := Matrix(N, shape = symmetric); for i to N do for j from i to N do if i <> j then Hamil(i, j) := Vij(ni[i], mi[i], nj[j], mj[j]) elif i = j then Hamil(i, j) := Vij(ni[i], mi[i], nj[j], mj[j])+(1/2)*(ni[i]^2+mi[i]^2)*Pi^2/L^2 end if end do end do; Eigenvec := Eigenvectors(Hamil, output = ['values', 'vectors']), Hamil end proc;
SigFigEi := proc (Location::integer, SigFig::integer, VecSize::integer) local values, Eig, i; global HamilMat, OptK; Eig := Vector(VecSize); for i from 2 to VecSize do Eig[i] := HamilMat(i)[1][Location]; if evalf(Eig(i), SigFig+1) = evalf(Eig(i-1), SigFig+1) then OptK := i; break end if end do; values := evalf(Eig[i], SigFig); return values, OptK end proc;
BasisFunc := proc (location) local ni, mi, func, i, j, p, N, res, BasisSol; global HamilMat, L, OptK; p := evalf(Pi); N := OptK^2; ni := Vector(N); mi := Vector(N); for i to N do for j to OptK do res := (i+OptK-j)/OptK; if type(res, integer) = true then ni[i] := j; mi[i] := res end if end do end do; func := Vector(N); for i to N do func[i] := HamilMat(OptK)[2][i][location]*sin(ni[i]*p*x/L)*sin(mi[i]*p*y/L) end do; BasisSol := unapply(add(func[i], i = 1 .. N), x, y); return plot3d(BasisSol(x, y), x = 0 .. L, y = 0 .. L), func end proc;
BasisFunc(1);
Error, (in Vector) dimension parameter is required for this form of initializer

Note added: Issue resolved, see my comment below.

I have a sum of several thousands addends each of which is the product of a c-number times a product of 6 Grassmann-odd degrees of freedom, the latter of which does each belong to a set of 24 Grassmannians. The specific numbers are not that important, though.

This sum should equal zero. So I would like to add all c-numbers multiplying the same product of six Grassmannians, taking proper care of anticommutativity, of course. The sum would then be zero if all these sums of c-numbers are zero. Unfortunately, using Physics:-Coefficients is far too slow; actually, it has never succeeded in even completing the calculation.

Therefore, I have tried to loop through all the addends, splitting each one of them using selectremove(), and then adding the c-numbers in an Array (properly indexed), or in a table (associatively indexed, of course). Consistently, by converting the Array and table to two sets, the two methods result in the same set of equations. But solving these equations yields a result that is not stable: it varies from session to session.

I am baffled. Can anyone give me a hint to a safe and reasonably quick method for extracting these c-number-valued equations?, for there has to be something wrong with what I do.

First 1203 1204 1205 1206 1207 1208 1209 Last Page 1205 of 2434