MaplePrimes Questions

hello everyone,
   INGT.mw
 

L__d := 100:

L__b := 200:

L__c := L__d+(1/2)*L__b;

200

(1)

X := .3;

.3

(2)

Error, (in plot) procedure expected, as range contains no plotting variable

 

`ΔE__g` := 1.155*X+.37*X^2;

.3798

(3)

V__0 := .6*`ΔE__g`;

.22788

(4)

m__D := 0.67e-1*m[e];

0.67e-1*m[e]

(5)

m__B := (0.67e-1+0.83e-1*X)*m[e];

0.919e-1*m[e]

(6)

Sol := solve(2*cos(L__d*sqrt(E__x))+(m__D*sqrt((V__0-E__x)/E__x)/m__B-m__B*sqrt(E__x/(V__0-E__x))/m__D)*sin(L__d*sqrt(E__x))-(m__D*sqrt((V__0-E__x)/E__x)/m__B+m__B*sqrt(E__x/(V__0-E__x))/m__D)*sin(L__d*sqrt(E__x))*exp(-sqrt(V__0-E__x)*L__b) = 0, E__x);

0.1110897170e-2, 0.3531161505e-2, -.2585338615+0.9991335677e-27*I

(7)

 

0.1110897170e-2, 0.3531161505e-2, -.2585338615+0.9991335677e-27*I

(8)

E__1 := 0.1110897170e-2:

K__1 := sqrt(E__1);

0.3333012406e-1

(9)

K__2 := sqrt(V__0-E__1);

.4762027959

(10)

C := cosh((1/2)*K__2*L__b);

0.2399908351e21

(11)

beta := m__D*K__2/(m__B*K__1);

10.41631973

(12)

B := -beta*sinh((1/2)*K__2*L__b);

-0.2499821271e22

(13)

A := -B*sin(K__1*L__d)+C*cos(K__1*L__d);

-0.7112056933e21

(14)

h := proc (x) options operator, arrow; piecewise(x <= -L__c, A*exp(K__2*(x+L__c)), -L__c < x and x < -(1/2)*L__b, -B*sin(K__1*(x+(1/2)*L__b))+C*cos(K__1*(x+(1/2)*L__b)), abs(x) <= (1/2)*L__b, (1/2)*exp(K__2*x)+(1/2)*exp(-K__2*x), (1/2)*L__b < x and x < L__c, -B*sin(K__1*(x-(1/2)*L__b))+C*cos(K__1*(x-(1/2)*L__b)), L__c <= x, A*exp(K__2*(x-L__c))) end proc:

'h(x)' = h(x);

h(x) = piecewise(x <= -200, -7.112056933*10^20*exp(95.24055918+.4762027959*x), -200 < x and x < -100, 2.499821271*10^21*sin(3.333012406+0.3333012406e-1*x)+2.399908351*10^20*cos(3.333012406+0.3333012406e-1*x), abs(x) <= 100, (1/2)*exp(.4762027959*x)+(1/2)*exp(-.4762027959*x), 100 < x and x < 200, 2.499821271*10^21*sin(0.3333012406e-1*x-3.333012406)+2.399908351*10^20*cos(0.3333012406e-1*x-3.333012406), 200 <= x, -7.112056933*10^20*exp(-95.24055918+.4762027959*x))

(15)

L__y := 200:

L__z := 200:

P := proc (x, y, z) options operator, arrow; h(x)*cos(Pi*y/L__y)*cos(Pi*z/L__z) end proc:

'Psi(x, y, z)' = P(x, y, z);

Psi(x, y, z) = piecewise(x <= -200, -7.112056933*10^20*exp(95.24055918+.4762027959*x), -200 < x and x < -100, 2.499821271*10^21*sin(3.333012406+0.3333012406e-1*x)+2.399908351*10^20*cos(3.333012406+0.3333012406e-1*x), abs(x) <= 100, (1/2)*exp(.4762027959*x)+(1/2)*exp(-.4762027959*x), 100 < x and x < 200, 2.499821271*10^21*sin(0.3333012406e-1*x-3.333012406)+2.399908351*10^20*cos(0.3333012406e-1*x-3.333012406), 200 <= x, -7.112056933*10^20*exp(-95.24055918+.4762027959*x))*cos((1/200)*Pi*y)*cos((1/200)*Pi*z)

(16)

INGT := proc (x__i) `assuming`([evalf(int(int(int(P(x, y, z)^2*exp(-lambda*sqrt((x-x__i)^2+y^2+z^2)), x = -infinity .. infinity), y = -L__y .. L__y), z = -L__z .. L__z))], [0 < lambda]) end proc

evalf(INGT(2))

``

Warning,  computation interrupted

 

``


 

Download INGT.mw
 

L__d := 100:

L__b := 200:

L__c := L__d+(1/2)*L__b;

200

(1)

X := .3;

.3

(2)

Error, (in plot) procedure expected, as range contains no plotting variable

 

`&Delta;E__g` := 1.155*X+.37*X^2;

.3798

(3)

V__0 := .6*`&Delta;E__g`;

.22788

(4)

m__D := 0.67e-1*m[e];

0.67e-1*m[e]

(5)

m__B := (0.67e-1+0.83e-1*X)*m[e];

0.919e-1*m[e]

(6)

Sol := solve(2*cos(L__d*sqrt(E__x))+(m__D*sqrt((V__0-E__x)/E__x)/m__B-m__B*sqrt(E__x/(V__0-E__x))/m__D)*sin(L__d*sqrt(E__x))-(m__D*sqrt((V__0-E__x)/E__x)/m__B+m__B*sqrt(E__x/(V__0-E__x))/m__D)*sin(L__d*sqrt(E__x))*exp(-sqrt(V__0-E__x)*L__b) = 0, E__x);

0.1110897170e-2, 0.3531161505e-2, -.2585338615+0.9991335677e-27*I

(7)

 

0.1110897170e-2, 0.3531161505e-2, -.2585338615+0.9991335677e-27*I

(8)

E__1 := 0.1110897170e-2:

K__1 := sqrt(E__1);

0.3333012406e-1

(9)

K__2 := sqrt(V__0-E__1);

.4762027959

(10)

C := cosh((1/2)*K__2*L__b);

0.2399908351e21

(11)

beta := m__D*K__2/(m__B*K__1);

10.41631973

(12)

B := -beta*sinh((1/2)*K__2*L__b);

-0.2499821271e22

(13)

A := -B*sin(K__1*L__d)+C*cos(K__1*L__d);

-0.7112056933e21

(14)

h := proc (x) options operator, arrow; piecewise(x <= -L__c, A*exp(K__2*(x+L__c)), -L__c < x and x < -(1/2)*L__b, -B*sin(K__1*(x+(1/2)*L__b))+C*cos(K__1*(x+(1/2)*L__b)), abs(x) <= (1/2)*L__b, (1/2)*exp(K__2*x)+(1/2)*exp(-K__2*x), (1/2)*L__b < x and x < L__c, -B*sin(K__1*(x-(1/2)*L__b))+C*cos(K__1*(x-(1/2)*L__b)), L__c <= x, A*exp(K__2*(x-L__c))) end proc:

'h(x)' = h(x);

h(x) = piecewise(x <= -200, -7.112056933*10^20*exp(95.24055918+.4762027959*x), -200 < x and x < -100, 2.499821271*10^21*sin(3.333012406+0.3333012406e-1*x)+2.399908351*10^20*cos(3.333012406+0.3333012406e-1*x), abs(x) <= 100, (1/2)*exp(.4762027959*x)+(1/2)*exp(-.4762027959*x), 100 < x and x < 200, 2.499821271*10^21*sin(0.3333012406e-1*x-3.333012406)+2.399908351*10^20*cos(0.3333012406e-1*x-3.333012406), 200 <= x, -7.112056933*10^20*exp(-95.24055918+.4762027959*x))

(15)

L__y := 200:

L__z := 200:

P := proc (x, y, z) options operator, arrow; h(x)*cos(Pi*y/L__y)*cos(Pi*z/L__z) end proc:

'Psi(x, y, z)' = P(x, y, z);

Psi(x, y, z) = piecewise(x <= -200, -7.112056933*10^20*exp(95.24055918+.4762027959*x), -200 < x and x < -100, 2.499821271*10^21*sin(3.333012406+0.3333012406e-1*x)+2.399908351*10^20*cos(3.333012406+0.3333012406e-1*x), abs(x) <= 100, (1/2)*exp(.4762027959*x)+(1/2)*exp(-.4762027959*x), 100 < x and x < 200, 2.499821271*10^21*sin(0.3333012406e-1*x-3.333012406)+2.399908351*10^20*cos(0.3333012406e-1*x-3.333012406), 200 <= x, -7.112056933*10^20*exp(-95.24055918+.4762027959*x))*cos((1/200)*Pi*y)*cos((1/200)*Pi*z)

(16)

INGT := proc (x__i) `assuming`([evalf(int(int(int(P(x, y, z)^2*exp(-lambda*sqrt((x-x__i)^2+y^2+z^2)), x = -infinity .. infinity), y = -L__y .. L__y), z = -L__z .. L__z))], [0 < lambda]) end proc

evalf(INGT(2))

``

Warning,  computation interrupted

 

``


 

Download INGT.mw

 

I'm trying to calculate a triple integral complicated by a procedure that changes each time a variable xi, while the program takes a lot of time and it gives me the message "Warning, computation interrupted". If anyone can help me I will be very happy

Is there something I should be doing whenever I use simplify to avoid things like this, or should I stop using the "is" function all together?

 

interface(showassumed = 0):

 

sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1)

(n-k+1)*binomial(n+1, k)/(k+1) = binomial(n+1, k+1)

(1)

#And we have:
is(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1))

FAIL

(2)

#And since:
is(simplify(convert(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1), 'factorial')))

true

(3)

is(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1)) = is(simplify(convert(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1), 'factorial')))


 

Download main.mw

Can I know how to write code about to solve the second kind of linear Fredholm and also Volterra approximation integral by Simpson's method and Galerkin method, and I need a book about advance math to the integral equation, thanks.

  1. Does it have any detail manual for Matlab programming using Maple symbolic engine? (Except help documentation of Maple Symbolic Toolbox in Matlab).
  2. How to maximize the running speed of the codes programmed by Maple symbolic toolbox? Any Notes?
  3. How to use the function 'GenerateMatrix' of Maple in Matlab? What's the syntax to use this function in Matlab?

Best Regards.

Si

Hello

I wonder how integrate can be applied term by term to the following nonlinear differential equation

(diff(y(t), t))*(diff(y(t), t, t, t))-(diff(y(t), t))*y(t)^2-(diff(y(t), t))*(diff(y(t), t, t))-(diff(y(t), t))*A*y(t)

The expected output will be something like 

(diff(y(t), t))*(diff(y(t), t, t))-(1/3)*y(t)^3-(1/2)*A*y(t)^2-(1/2)*(diff(y(t), t))^2+C+int((diff(y(s), s, s))^2, s = 0 .. t)
map(x-> integrate(x,t),(diff(y(t), t))*(diff(y(t), t, t, t))-(diff(y(t), t))*y(t)^2-(diff(y(t), t))*(diff(y(t), t, t))-(diff(y(t), t))*A*y(t))

solves most of it but not the first part. 

Many thanks

Ed

 

I was attempting to construct  a log question and noticed a problem with the answers that are being resolved by maple.

restart:
with(StringTools):
a := 2:
b := 10:
 c := -4:
d := 5:
rs := 4:
#notice I use the word filler below, in order to randomize later and replace "filler" with various "log[base]" or "ln".
equation1 := convert(filler(a*x+b)-filler(c*x+d) = rs, string):
equationAct := parse(SubstituteAll(equation1, filler, cat(ln))):
answer := [solve(equationAct, x)]:

#it appears maple is applying the log properties and suggesting solutions outside the real domain, for the individual log expressions.  The plot of the equation seems to confirm this.
plotA := plot(lhs(equationAct), x = -10 .. 10):
plotB := plot(rhs(equationAct), x = -10 .. 10):
plots[display](plotA, plotB);

restart:
NewtonRaphsonSYS:=proc(X,F,X0,TOL,itmax)
local Xn,H,FX,J,i,m,n,Err;
m:=LinearAlgebra[Dimension](Vector(X));
Xn:=Vector(m);
H:=Vector(m);
FX:=Vector(m);
J:=Matrix(m,m);
Xn:=X0;

for n to itmax do
    FX:=eval(F,[seq(X[i]=Xn[i],i=1..m)]);
    J:=evalf(VectorCalculus[Jacobian](F,X=convert(Xn,list)));
H:=-Inverse(J).Vector(FX);
Xn:=Xn+H;

printf("%3d %.8f",n,Xn[1]);
 
for i from 2 to m do;
 printf("%.8f",Xn[i]);

end do;
for i from 1 to m do;
 printf("%.3g",H[i]);

end do;
printf("\n");
if (LinearAlgebra[VectorNorm](H,2)<TOL) then break end if;
end do;
end proc:
F:=[xy-z^2-1,xyz+y^2-x^2-2,e^x+z-e^y-3];
X:=[x,y,z];
X0:= <1,1,1>;
TOL:=0.00000001;
itmax:=10;

      [  2             2    2             x        y    ]
      [-z  + xy - 1, -x  + y  + xyz - 2, e  + z - e  - 3]
                           [x, y, z]
                Vector[column](%id = 4442374402)
                                 -8
                             1 10  
                               10
NewtonRaphsonSYS(X,F,X0,TOL,itmax);

 

Maple is not able to simplify x^3+a*x+b) -(y^3+a*y+b) )^2/(x-y)^4   into (x^2 + x*y + y^2 + a)^2/(x - y)^2 

wtf

p.s.  how do I get maple to show steps in simplifications

Hello people :) 

As the captian says, im trying to remove an old task i've made.
But i get this:

Error in Get, invalid object [_XML_reply_data_get("reference" =
"_Maplets_reference_12","parameter" =
"value",_XML_content("Task,UserTasks,Nyops",&Entity "#xc3",&Enity
"#xa6","tning"))]

And i have no idea what it is, but it won't erase my task :'D

Thanks a bunch in advance! 

Have a great weekend you all
Best regards Lucas :)

Hi

I am a student of economics writing my thesis. I have an inverse demand function defined:

p[i,j]=1-q[i,j]-αq[i,k]-β(q[h,j]+αq[h,k])

where α,β are scalars, i{1,2,}, j {1,2,3}, h/=i and k/=j.

I wanted to know how do i input this kind of function in the program and how do i calculate the function of q[i,j] (the inverse)

Thank you!

I would like to extract the x and y values from a list containing ordered pairs, [x,y], and display as a list.

For example, given 

  A:= [ [4,2], [9,1], [6,8] ] 

how can I obtain 

 X:=[4,9,6] and Y:=[2,1,8] 

using a simple command?

Thank you!

Why is lamba protected as something it traditionally isnt for this package?

 


 

restart

lambda(n) = (-1)^Omega(n)

 

 

with(numtheory)

lambda(n) = (-1)^Omega(n)

 

[GIgcd, bigomega, cfrac, cfracpol, cyclotomic, divisors, factorEQ, factorset, fermat, imagunit, index, integral_basis, invcfrac, invphi, iscyclotomic, issqrfree, ithrational, jacobi, kronecker, lambda, legendre, mcombine, mersenne, migcdex, minkowski, mipolys, mlog, mobius, mroot, msqrt, nearestp, nthconver, nthdenom, nthnumer, nthpow, order, pdexpand, phi, pi, pprimroot, primroot, quadres, rootsunity, safeprime, sigma, sq2factor, sum2sqr, tau, thue, varphi]

(1)

Omega := proc (n) options operator, arrow; bigomega(n) end proc:

numtheory:-lambda(667)

308

(2)

``


 

Download main.mw

My learning exercise today is the Calkin-Wilf Tree, and the first worksheet I have the issue, due to needing to use a set operator and at that point of computation losing the ordering if it were to be a list (I have tried with a list, and was unsuccessful) none the less my question is, can I alter the ordering condition for Sets in a worksheet produced therein? 

I also encountered a strange result that I would appreciate an explaination for as seen below in the uploaded worksheet

 


 

restart

``

https://en.wikipedia.org/wiki/Calkin–Wilf_tree

 

 

Q := proc (n) options operator, arrow; (`minus`(map(rhs, solve(`union`(seq({q[0] = 1/2, q[1] = 1, q[i+1] = 1/(2*floor(q[i])-q[i]+1)}, i = 1 .. n)))), map(rhs, solve(`union`(seq({q[0] = 1/2, q[1] = 1, q[i+1] = 1/(2*floor(q[i])-q[i]+1)}, i = 1 .. n-1))))))[] end proc

proc (n) options operator, arrow; (`minus`(map(rhs, solve(`union`(seq({q[0] = 1/2, q[1] = 1, q[i+1] = 1/(2*floor(q[i])-q[i]+1)}, i = 1 .. n)))), map(rhs, solve(`union`(seq({q[0] = 1/2, q[1] = 1, q[i+1] = 1/(2*floor(q[i])-q[i]+1)}, i = 1 .. n-1))))))[] end proc

(1)

NULL

delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

(2)

 

 

q[1] := 1

1

(3)

q[2] := 1/2

1/2

(4)

q0 := proc (n) options operator, arrow; 1/(2*floor(Q(n)*(1-delta(n, 2))+delta(n, 2)*q[2]+delta(n, 1)*q[1])-Q(n)*(1-delta(n, 2))-delta(n, 2)*q[2]-delta(n, 1)*q[1]+1) end proc

proc (n) options operator, arrow; 1/(2*floor(Q(n)*(1-delta(n, 2))+delta(n, 2)*q[2]+delta(n, 1)*q[1])-Q(n)*(1-delta(n, 2))-delta(n, 2)*q[2]-delta(n, 1)*q[1]+1) end proc

(5)

[seq(q0(k), k = 1 .. 20)][1]

1/(2*floor(()+1)+())

(6)

NULL


 

Download Q1_MP_08112019.mw

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


Hello. Here is my question.

 

#GIVEN:

ST := [`162` = Record(mu = 475, sigma = 41), `70` = Record(mu = 480, sigma = 42),
       `168` = Record(mu = 448, sigma = 103)]

[`162` = Record(mu = 475, sigma = 41), `70` = Record(mu = 480, sigma = 42), `168` = Record(mu = 448, sigma = 103)]

(1)

Games:=[[`162`, `70`], [`70`, `168`], [`168`, `162`]]

[[`162`, `70`], [`70`, `168`], [`168`, `162`]]

(2)

#I need Maple commands to follow the order of Games to auto create STO please

STO:=[`162` = Record(mu = 475, sigma = 41),`70` = Record(mu = 480, sigma = 42),
       `70` = Record(mu = 480, sigma = 42),`168` = Record(mu = 448, sigma = 103),
     `168` = Record(mu = 448, sigma = 103),`162` = Record(mu = 475, sigma = 41)]

`Non-fatal error while reading data from kernel.`

(3)

 


 

Download ORDERED.mw

First 623 624 625 626 627 628 629 Last Page 625 of 2427