MaplePrimes Questions

I try to give the plot, but it shows nothing. why? How can l find the range where 2+r*(b-2)*sqrt(b-1) can be positive, and the range where 2+r*(b-2)*sqrt(b-1) can be negative?


 

restart; with(plots, implicitplot); implicitplot(2+r*(b-2)*sqrt(b-1), b = 1 .. 100, r = 1 .. 100, scaling = constrained)

 

``

``


 

Download mm.mw

Hello Guys and Girls,

I have a problem with animate command with background option..

I attached my maple worksheet for your review.

Could you help me out?  Thanks.

I love Maple,

Sincerely

Ali Guzel

HI, 

I am using the series function on KummerU (Kummer function of the second kind). 

I found that series(KummerU(p,1/2,t),t) works as below, but series(KummerU(p,1/2,t),p) gives me the following error "Error in (series/fracpower) unable to compute series". 

Any idea what that is the case 

Thanks

series(KummerU(p, 1/2, t), t)

Could anyone give an example how to use the hint option in polynomial solutions in PDEtools in maple?

Hello, I have this:

maple.mw

I need save the three solutions in three different variables.

Thanks a lot!!!

I'm trying show the all roots of equations using Bairstow's methodt, but only shows the roots of Quadratic Factor and don't show the others roots of the other equation. Thanks

This the code:


 

restart; Bairstow := proc (n, a, u0, v0, itmax, TOL) local u, v, b, c, j, k, DetJ, du, dv, s1, s2; u := u0; v := v0; b := Array(0 .. n); c := Array(0 .. n); b[n] := a[n]; c[n] := 0; c[n-1] := a[n]; for j to itmax do b[n-1] := a[n-1]+u*b[n]; for k from n-2 by -1 to 0 do b[k] := a[k]+u*b[k+1]+v*b[k+2]; c[k] := b[k+1]+u*c[k+1]+v*c[k+2] end do; DetJ := c[0]*c[2]+(-1)*c[1]*c[1]; du := (-b[0]*c[2]+b[1]*c[1])/DetJ; dv := (b[0]*c[1]-b[1]*c[0])/DetJ; u := u+du; v := v+dv; printf("%3d %12.7f %12.7f %12.4g %12.4g\n", j, u, v, du, dv); if max(abs(du), abs(dv)) < TOL then break end if end do; printf("\nQ(x)=(%g)x^%d", b[n], n-2); for k from n-3 by -1 to 1 do printf(" + (%g)x^%d", b[k+2], k) end do; printf(" + (%g)\n", b[2]); printf("Remainder: %g(x-(%g))+(%g)\n", b[1], u, b[0]); printf("Quadratic Factor: x^2-(%g)x-(%g)\n", u, v); s1 := evalf((1/2)*u+(1/2)*sqrt(u*u+4*v)); if u^2+4*v < 0 then printf("Zeros: %.13g +-(%.13g)i\n", Re(s1), abs(Im(s1))) else s2 := evalf((1/2)*u-(1/2)*sqrt(u*u+4*v)); printf("Zeros: %.13g, %.13g\n", s1, s2) end if end proc; P := proc (x) options operator, arrow; x^5+(-1)*3.5*x^4+2.75*x^3+2.125*x^2+(-1)*3.875*x+1.25 end proc; n := degree(P(x)); a := Array(0 .. n); a[0] := P(0); for i to n do a[i] := coeff(P(x), x^i) end do; itmax := 10; TOL := 10^(-10); r := -1; s := -1; Bairstow(n, a, r, s, itmax, TOL)

  1   -0.6441699    0.1381090       0.3558        1.138
  2   -0.5111131    0.4697336       0.1331       0.3316
  3   -0.4996865    0.5002023      0.01143      0.03047
  4   -0.5000001    0.5000000   -0.0003136   -0.0002023
  5   -0.5000000    0.5000000    6.413e-08    9.268e-09
  6   -0.5000000    0.5000000            0            0

Q(x)=(1)x^3 + (-4)x^2 + (5.25)x^1 + (-2.5)
Remainder: 0(x-(-0.5))+(0)
Quadratic Factor: x^2-(-0.5)x-(0.5)
Zeros: 0.4999999993, -0.9999999997

 

 

Only show two roots: 0.4999999993, -0.9999999997, but the other roots are missing: 2, -1, 1+0.5i, 1-0.5i approximately, any solution?

I think it's in this part, but I can't think of how to implement it to get the missing roots.

 

Download Bairstow.mw

 

I'm using the 15 day trial as a Computer Science student. For my first project, Maple worked very well. I've been using the ApproximateInt() command. This command worked in the first assignment, and so I created a new document to start on my second assignment, and suddenly:

Entering the same ApproximateInt() command in a prompt line will not execute the command. Where it should display a plot of Riemann sums, it only displays the text I had entered. If I open the first document in which it was working properly, it also breaks upon re-iterating the command lines.

Image of expected behaviour:

Image taken right after pressing enter:

Is anyone familiar with this Maple behaviour? Thank you for any help. Meanwhile, I will attempt a reinstallation. The maple file is attached, as well.

P.S: Interestingly, the plot() command does work, as well as simple commands such as 1+2 (Displays "3")

my code is 
for i from 1 to 20 do:

print("new variable" + i)

end do;

It gives the result new vaiable + 1,

how can I print out new variable 1 instead of new variable + 1

The dsolve numeric events syntax requires the use of If(a,b,c) rather than the usual if then else syntax. Also, the possible action parts of an event are truly mysterious as are discrete variables. Has anyone plaed around with this much? For example, can the If's be nested? I know I can test that in a toy situation but there are many such questions that arise and I don't want to reinvent the wheel.

Can Maple auto switch input language according to mode of editing?

I would like to:
In 2D-math mode- auto set (after pressing F5 or clicking "math" button) english language
In Text-mode- auto set (after pressing F5 or clicking "text" button) my native language

How Can I set up this option?

My colleague and I are revising a paper which contains some 3dplots generated I think originally in Maple 2015 on macos as eps converted to pdf.  Originally they were around the 100 KB size.  When I generate them again in Maple 2017 they are more like 10 MB.  He is still running Maple 2015 and get the same 100 KB size.  Any idea what is going on here ?  

Thanks Michael

EDIT:  An example is 

with(plots);
plotsetup(postscript, plotoutput = `test.eps`, plotoptions = `color,portrait,height=350,width=350`);
plot3d(x^2+y^2+1, x = -1 .. 1, y = -1 .. 1, axes = boxed, grid = [200, 200]);

I get 7.6 MB my colleague with Maple 2015 gets 56 KB.  I tried it wtih Maple 2017 on a server I have access to also 7.6 MB.

my_euler := proc (func_y, x_value, y_value, n, h) 
local point_list, d_x, true_f, true_f_v; point_list := [10^(-n), 0, n]; 
true_f := unapply(func_y, x, y); 
d_x := abs(point_list[2]-point_list[3]); 
while d_x < point_list[1] do 
    true_f_v := true_f(x_value, y_value); 
    y_value := y_value+h*true_f_v; 
    x_value := x_value+h 
end do; 
return y_value 
end proc

I am using Maple to implement Euler's method, it requires 5 parameters:

  • func_y (The general form of ODE)
  • x_value
  • y_value
  • n (The accurate digits, I do not know how to control the accurate digits)
  • h (The step size)

So, I do not how to control accurate digits (4 accurate digits), can you teach me how to finish this part?

I am using Maple to load well-behaved function data (512 points) and using ArrayInterpolation integrate it:

P:= r -> CurveFitting:-ArrayInterpolation(xydata, Array(1 .. 1, 1 .. 1, [r]), method = spline)[1];.

While the simple integral    int(P, 0 .. 100, numeric, digits = 4)    outputs a number, if I add another variable like   int(P*a, [r = 0 .. 1, a = 0 .. 1], numeric)    it just outputs      int(P*a, [r = 0 .. 1, a = 0 .. 1], numeric)  (obviously the integral is more complex but this just shows the principle).

int(P(r)*a, [r = 0 .. 1, a = 0 .. 1], numeric)  gives and error 'invalid input: coordinates of xvalues must be of type numeric'. Does anyone know the syntax to make this integral evaluate numerically?

I really wouldn't want to use   spline()  or interpolation()  because as far as I have tried they are really slow and incompatable respectively. Actual document below.


Much thanks in advance.

restart; with(LinearAlgebra); with(CurveFitting); with(Interpolation); with(plots)

NULL

NULL

data := Import("C:/Users/Ingvars/Desktop/data.csv", output = Matrix)

NULL

NULL``

P := proc (r) options operator, arrow; CurveFitting:-ArrayInterpolation(`<|>`(Column(data, 1), `~`[`^`](Column(data, 15), 2)), Array(1 .. 1, 1 .. 1, [[r]]), method = spline)[1] end proc
``

``

NULLNULL

display(plot(P, 0 .. 10), pointplot(Column(data, 1)[1 .. 450], `~`[`^`](Column(data, 15)[1 .. 450], 2), symbolsize = 2, color = red))

 

NULL

int(P, 0 .. 100, numeric, digits = 4)

1.000

(1)

NULL

"F_R(m,l,q):=2*int(P*sin(q r cos(theta))^(2)*sin(theta)*|(Y)[l]^(m)(theta,phi)|^(2),[theta=0..Pi,phi=0..2 Pi,r=0..100],numeric,digits=4):"NULL

"F_I(m,l,q):=int(P*sin(q r cos(theta))*sin(theta)*|(Y)[l]^(m)(theta,phi)|^(2),[theta=0..Pi,phi=0..2 Pi,r=0..100],numeric,digits=4):" 

 

"F(m,l,q):=|F_R(m,l,q)-i*F_I(m,l,q)|:"

 

 

evalf(F(1, 2, 1))

abs(-2.*(Int(Int(Int(P*sin(r*cos(theta))^2*sin(theta)*abs(SphericalY(2., 1., theta, phi))^2, theta = 0. .. 3.142), phi = 0. .. 6.284), r = 0. .. 100.))+(1.*I)*(Int(Int(Int(P*sin(r*cos(theta))*sin(theta)*abs(SphericalY(2., 1., theta, phi))^2, theta = 0. .. 3.142), phi = 0. .. 6.284), r = 0. .. 100.)))

(2)

``


 

Download Au_Scattering.mw


 

with(LinearAlgebra); S[p] := 34.722406639004; alpha[1] := 0.2e-3; mu := 0.2041e-1; tau := .33; beta := .5; eta[1] := 0.96e-1; alpha[2] := .2; sigma := .9; e[o] := .33; delta := .2115; eta[2] := 0.2485e-2; A := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = alpha[1]*S[p], (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = beta, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0}); B := Matrix(6, 6, {(1, 1) = mu, (1, 2) = tau, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = e[o], (2, 1) = 0, (2, 2) = tau+mu, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = beta+eta[1]+sigma+mu, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = (1-delta)*alpha[2]-mu, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = alpha[2]*delta, (5, 5) = mu+eta[2], (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = mu+e[o]}); 1/B; VectorMatrixMultiply(A, 1/B)

S[p] := 34.722406639004

 

alpha[1] := 0.2e-3

 

mu := 0.2041e-1

 

tau := .33

 

beta := .5

 

eta[1] := 0.96e-1

 

alpha[2] := .2

 

sigma := .9

 

e[o] := .33

 

delta := .2115

 

eta[2] := 0.2485e-2

 

A := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0.6944481328e-2, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = .5, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0})

 

B := Matrix(6, 6, {(1, 1) = 0.2041e-1, (1, 2) = .33, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = .33, (2, 1) = 0, (2, 2) = .35041, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1.51641, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = .13729, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0.4230e-1, (5, 5) = 0.22895e-1, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = .35041})

 

Matrix(6, 6, {(1, 1) = 48.9955903968643, (1, 2) = -46.1417905623847, (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = -46.1417905623847, (2, 1) = 0., (2, 2) = 2.85379983447961, (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = -0., (3, 1) = 0., (3, 2) = 0., (3, 3) = .659452258953713, (3, 4) = 0., (3, 5) = 0., (3, 6) = -0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 7.28385170077937, (4, 5) = 0., (4, 6) = -0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = -13.4573892528049, (5, 5) = 43.6776588774842, (5, 6) = -0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 2.85379983447961})

 

Matrix(6, 6, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = -0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (2, 6) = -0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0.457955389901148e-2, (3, 4) = 0., (3, 5) = 0., (3, 6) = -0., (4, 1) = 0., (4, 2) = 0., (4, 3) = .329726129476857, (4, 4) = 0., (4, 5) = 0., (4, 6) = -0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = -0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = -0.})

(1)

LinearAlgebra:-Eigenvalues( (1) );

Vector(6, {(1) = 0.+0.*I, (2) = 0.+0.*I, (3) = 0.+0.*I, (4) = 0.457955389901148e-2+0.*I, (5) = 0.+0.*I, (6) = -0.+0.*I})

(2)


 

Download AB.mw

hello everyone, I had mistake from maple plot.

Can someone help me with animation my plot


restart;
with(plots);

with(plottools);

K := 48;
R1 := 30; R2 := 20; OA := R1+R2;
Vodilo := PLOT3D(cuboid([-3, -3, 0], [OA+4, 4, 2]));

Koleso1 := PLOT3D(cylinder([0, 0, 5], R1, 18), cylinder([0, 0, -2], 1, 16));
Koleso2 := PLOT3D(cylinder([0, 0, 7], R2, 6), cylinder([0, 0, -2], 1, 16));
for i from 0 to K do  end do;

Amplituda := .3;
phi := sin(6.28*i/K)*Amplituda;

phi1 := phi*(R1+R2)/R2;

P1 := rotate(Koleso2, 0, 0, -phi1);


P2 := rotate(Vodilo, 0, 0, -phi);

x := OA*cos(phi); y := OA*sin(phi);

P[i] := display(Koleso1, translate(P1, x, y, 0), P2);


display(seq(P[i], i = 0 .. K), orientation = [55, 101], insequence = true, scaling = constrained, axes = normal);
Error, (in plots:-display) expecting plot structure but received: P[0]

 

First 426 427 428 429 430 431 432 Last Page 428 of 2281