Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer
i count the number among group
but when the list a large such as over 1000 records, the count will be over 30,000
use which denominator to find probability?
is there any functions in maple for this case?
 
with(LinearAlgebra):
correlationlist1 := [[1,2,3],[1,3,5]....]:
PAB := Matrix(50):
for ii from 1 to nops(correlationlist) do
 for jj from 1 to nops(correlationlist[ii]) do
  for kk from 1 to nops(correlationlist) do
   for qq from 1 to nops(correlationlist[kk]) do
    if ii <> kk then
     #print("scan=",correlationlist2[kk],"kk=",kk,"qq=",qq,"row=",correlationlist[ii][jj],"column=",correlationlist[kk][qq]):
     PAB[correlationlist[ii][jj],correlationlist[kk][qq]] := PAB[correlationlist[ii][jj],correlationlist[kk][qq]] + 1: # group to group relations
    end if:
   od:
  od:
 od:
od:

If there is a list

[[1,2],[2,2],[3,3]...

how to use correlate function?

assume [1,2] and [2,1] count as 2 

when find correlation between 1and 2

and how about 

if [1,2] and [2,1] are different

first position as key

means 1 relate with 2 count as 1 case for 1 only

[2,1] count as 1 case for 2 only

 

If input a group of outputs which are binary numbers

can it simplify to give a logic that can output these outputs

I'm studying for an exam and earlier today I was working in my Maple sheet. I saved it as usual and no .bak file was in the directory afterwards. When I now later in the day tried to open it, I got the pop up message:
"There were problems during the loading process. your worksheet may be incomplete" and half of the content is missing.

I've searched on google and tried to solve it myself, unfortunately without any luck.

I would really appreciate any help.

Best regards

Hi everybody,

I am used to using  the DocumentTools :-RunWorksheet command and I am confronted with the following problem :

  • My worksheet is deemed to generate a plot in a png file
    > plotsetup(png, plotoutput=MyFile, …)
    > plot( …)

    But MyFile is not created
     
  • Thinking that the mw file launched by  DocumentTools :-RunWorksheet is seen as a procedure, I have thought that print(plot(…)) would fix the issue.
    Unfortunately the png file is still not created (same behavior with a jpeg file)

I know that  DocumentTools :-RunWorksheet is “experimental” but I wonder if I am doing something wrong or if DocumentTools :-RunWorksheet simply does not support plots ?

Thanks in advance

Dear please check once it showing an error program.mw as intial value is not conververging

proc:=changecoords([x,y],logrithmic);
dsolvediff(x,t):=Matrix([[ 1 , 0],
        [ 0 , i ]])x+Vector[column]([ x^i ,
                 0]);
x:=y+h(y);
for i from 2 to 10;
solve;
end do;

endproc;

     
MakeIteration := proc( expr::algebraic, x::name )
    local iteration := diff(x,t)=Matrix([[ 1 , 0 ],
        [ 0 , i]])x+Vector[column]([ x^i ,
                 0]),x:=y+h(y);
for i from 2 to 10 ;
end do ;
    unapply(iteration, x);
endproc;
Error, missing operator or `;`

Hi , I would like to solve nonlinear equation by using maple,but I wander how I can write it since there is a change of veriable bysubstiuting the value of y in the diifferenitat . Iactually coudnot write the equation sine it contains differential ,matrix and vector . do Ihave to use dalembertian? 

best regards 

 

Dear MaplePrimes team,

 

For display a beautiful parametric surface with hole (or pierced surface), unfortunately unlike CAD (computer-aided design) tool, Maple requires a large grid number. Therefore the computing is too long and requires huge RAM only with grid of [500,500] on a modern computer.

      

Fig. 1: For a complex surface such an aircraft fuselage here, Needs high grid, therefore, the compilation is too long with modern computer (Intel Core i7, 2.4 GHz CPU, 16 GB RAM). If displays supplementary windows holes on fuselage, the software may bug when the RAM is full.

 

Question 1:

In matter of low cost computation, do you have better solution to create a fast surface with smooth hole from given a parametric surface equation S(x,y) and given any convex/concave-closed parametric curve C(t) that is projected on surface S(x,y)?

Fig. 2: These surfaces are been created in Maple 2016 from given initial parametric surface equation and curve projected on the surface. But requires huge grid, huge RAM, and long time to get smooth hole when free CAD tools are fast and low RAM.

 

Question 2:

Because I noted that the Maple’s view option renderers smooth edges of any surface. My question is: Is it possible to use the internal structure of display/view used by Maple to apply at free boundaries? I think it will be possible to create many class of view, for examples: cylindrical sector, spherical sector views or more rather to be limited with conventional cubic view. And thus, I think it will be possible to create own smooth hole or multiple-hole on surface and get smooth pierced surface.

 

I know that almost of technicians/engineers will recommend me to use a CAD tool to create surface with hole. But the objective here is to keep purely a mathematical mind and work with exact equations (analytic equations).

On a free CAD tool, even the complex holes are created very fast only with low RAM. Why not on Maple?

 

Best.

 

Guy.

Hi , I have question about poincare's theorem which needs to change the veriable and that transform the coordinates , but when I change the variable from x to y if doesn't defined any suggestion ? Please 

I want to maximize a total profit (TP) function which is dependent on five independent variables (E,W,T, theta, tp). All these five variables can have non negative values. The TP function is given below- ( first TP is directly copied from maple worksheet and than copied again as a picture for clear viewing).

 

 TP = (p1*(Q-q)+p1*(1-theta)*(q-E)+s*E-c*Q-o-h*((1/6)*alpha*W^beta*a*p1^(-b)*tp^3/m-(1/2)*alpha*W^beta*a*p1^(-b)*tp^2+Q*tp)-(t1-tp)*h*((1/2*(-(2/3)*t1+m-(1/3)*tp))*W^beta*a*alpha*(t1-tp)*(-p1*(-1+theta))^(-b)+W*m)/m-(1/2)*h*(W+E)*(T-t1))/T-u*W

 

I am trying the maximize TP with respect to above five independent variables. I tried to solve  five equations ( representing first order partial derivative of TP with respect to each of the independent variables equated to zero) simultaneously by "solve" and "fsolve" command but both these commands fail to give any output. I have also tried three other commands in optimization package ( QPSolve, NLPSolve, Maximize) but all these three commands also doesn't give any output. I want to prove the concavity of TP function with respect to five independent variables, please guide how it can be done. ( I have computed the Hessian matrix but since five first order equations doesn't give output ( through fsolve command) so I am unable to compute Hessian at these first order optimiality condition solution.). The values of the paramters in the TP equation are -

[alpha = 50, beta = .7, c = 20, h = 4, m = .4, o = 10, p1 = 40, s = 10, u = 5, a = 15000, b = 2]

restart;
with(plots); with(DEtools);
`&epsilon;` := .1;
de1 := x[0](t)+`&epsilon;`*x[1](t);
ode2 := sin(t)-`&epsilon;`*t*sin(t);
MODEL := {ode1, ode2};
VARS := {x(t), y(t)};
DOMAIN := t = 0 .. 20;
RANGE := x = -3 .. 3, y = -3 .. 3; COLORS := [BLACK, BLUE];
IC1 := [x[0](0) = 0, x[1](0) = 0]; IC2 := [(D(x[0]))(0) = 1, (D(x[1]))(0) = 0];
DEplot(MODEL, VARS, DOMAIN, RANGE, [IC1, IC2], stepsize = .1, arrows = THIN, linecolor = COLORS);
Error, (in DEtools/DEplot/CheckInitial) the 'number' option must be specified before initial conditions

Hi, is anyone using the Geometry Expressions software together with Maple? I've found about this software on forum and installed a free demo version. It is using symbolic geometry, which I haven't been able to find this feature on other software, and can work very well with Maple, but unfortunatelly, my demo version doesn't work properly, and their oficial website http://saltire.com/ has lots of errors 404 page not found. I have requested support, but have had no answer so far. I was so happy finding this software, but now I am thinking maybe wasting my time. If you are using it, or maybe think it would be good to give it a go, please let me know if it is working for you. A particular feature which is not working for me is 'creating angles'. Thank you.

Dears I have the following statment in Matlab

r=8;             ZUM=U(1)-YU(1);            IT=0;

for r=2:10

    ZU(r)=abs(U(r)-YU(r));

    if ZU(r)> ZUM

        ZUM=ZU(r);

    else

        ZUM=ZUM;

    end

end

ZUM;

while IT < 20

    IT=IT+1

    if ZUM < (0.1)^r

    IT=20;

    else

  for r=1:Nx

  YU(r)=U(r);

  end

YU;

I need to write this statment in Maple

All the 3d plot in my maple are upside down.....the tickmarks..the numbering even the lebeling are also upside down...how do i solve it....plz help

Please I need Correction on this code particularly if I can make do without the declaration of vector in the third subroutine . The idea is to get maximum error. The code has 3 subroutine. The problem I think is in the third subroutine (Display of results).

Thank you in anticipation of positive response.

# First Declaration of the problem

restart:
Digits:=30:
interface(rtablesize=infinity):

f1:=proc(n)
    y2[n]:
end proc:
f2:=proc(n)
    -y1[n]+0.001*cos(t[n]):
end proc:
f3:=proc(n)
    y4[n]:
end proc:
f4:=proc(n)
    -y3[n]+0.001*sin(t[n]):
end proc:
F1:=proc(n)
    f2(n):
end proc:
F2:=proc(n)
    -(f1(n))-0.001*sin(t[n]):
end proc:
F3:=proc(n)
    f4(n):
end proc:
F4:=proc(n)
    -f3(n)+0.001*cos(t[n]):
end proc:


# Declaration of the Numerical methods

e1:=y1[n+2] = (7/23)*y1[n]+(16/23)*y1[n+1]+(12/23)*f1(n+2)*h+(16/23)*f1(n+1)*h-(2/23)*F1(n+2)*h^2+(2/23)*h*f1(n)+((24/3703)*y1[n]-(24/3703)*y1[n+1]+(48/18515)*f1(n+2)*h+(8/55545)*f1(n+1)*h-(116/55545)*F1(n+2)*h^2+(208/55545)*h*f1(n))*u^2+((901/2980915)*y1[n]-(901/2980915)*y1[n+1]+(7109/89427450)*f1(n+2)*h+(923/14904575)*f1(n+1)*h-(6241/89427450)*F1(n+2)*h^2+(14383/89427450)*h*f1(n))*u^4+((1979723/158376013950)*y1[n]-(1979723/158376013950)*y1[n+1]+(6364571/2375640209250)*f1(n+2)*h+(728327/215967291750)*f1(n+1)*h-(11785633/4751280418500)*F1(n+2)*h^2+(5106559/791880069750)*h*f1(n))*u^6+((6488435581/13259239887894000)*y1[n]-(6488435581/13259239887894000)*y1[n+1]+(8693517709/91794737685420000)*f1(n+2)*h+(260601208141/1789997384865690000)*f1(n+1)*h-(323357994149/3579994769731380000)*F1(n+2)*h^2+(891627999937/3579994769731380000)*h*f1(n))*u^8+((25090513463/1343541160668420000)*y1[n]-(25090513463/1343541160668420000)*y1[n+1]+(190450718149/55421072877572325000)*f1(n+2)*h+(47563947061/8210529315195900000)*f1(n+1)*h-(1475729910283/443368583020578600000)*F1(n+2)*h^2+(261738159769/27710536438786162500)*h*f1(n))*u^10+((244426606265778733/347060946154014557665200000)*y1[n]-(244426606265778733/347060946154014557665200000)*y1[n+1]+(1316372988977975777/10411828384620436729956000000)*f1(n+2)*h+(105391490263288387/473264926573656214998000000)*f1(n+1)*h-(1284959669761615073/10411828384620436729956000000)*F1(n+2)*h^2+(72506125749079249/204153497737655622156000000)*h*f1(n))*u^12:

e2:=h^2*F1(n+1) = (60/23)*y1[n]-(60/23)*y1[n+1]+(25/46)*f1(n+2)*h+(32/23)*f1(n+1)*h-(4/23)*F1(n+2)*h^2+(31/46)*h*f1(n)+((209/3703)*y1[n]-(209/3703)*y1[n+1]+(1313/222180)*f1(n+2)*h+(1304/55545)*f1(n+1)*h-(131/18515)*F1(n+2)*h^2+(6011/222180)*h*f1(n))*u^2+((77491/35770980)*y1[n]-(77491/35770980)*y1[n+1]+(574843/2146258800)*f1(n+2)*h+(113536/134141175)*f1(n+1)*h-(53461/178854900)*F1(n+2)*h^2+(2258041/2146258800)*h*f1(n))*u^4+((151508243/1900512167400)*y1[n]-(151508243/1900512167400)*y1[n+1]+(1290306599/114030730044000)*f1(n+2)*h+(18919693/647901875250)*f1(n+1)*h-(113769323/9502560837000)*F1(n+2)*h^2+(4470322013/114030730044000)*h*f1(n))*u^6+((42120775181/14464625332248000)*y1[n]-(42120775181/14464625332248000)*y1[n+1]+(332746636891/734357901483360000)*f1(n+2)*h+(302396120633/298332897477615000)*f1(n+1)*h-(369019384141/795554393273640000)*F1(n+2)*h^2+(13797329479621/9546652719283680000)*h*f1(n))*u^8+((18953368786273/177347433208231440000)*y1[n]-(18953368786273/177347433208231440000)*y1[n+1]+(2430202319484337/138330997902420523200000)*f1(n+2)*h+(310803544671199/8645687368901282700000)*f1(n+1)*h-(203453960588449/11527583158535043600000)*F1(n+2)*h^2+(7380568619069419/138330997902420523200000)*h*f1(n))*u^10+((16436168060905785763/4164731353848174691982400000)*y1[n]-(16436168060905785763/4164731353848174691982400000)*y1[n+1]+(167160345356705269819/249883881230890481518944000000)*f1(n+2)*h+(461636091223370027/354948694930242161248500000)*f1(n+1)*h-(13852288092290788813/20823656769240873459912000000)*F1(n+2)*h^2+(29059878239787610409/14699051837111204795232000000)*h*f1(n))*u^12:


e3:=y2[n+2] = (7/23)*y2[n]+(16/23)*y2[n+1]+(12/23)*f2(n+2)*h+(16/23)*f2(n+1)*h-(2/23)*F2(n+2)*h^2+(2/23)*h*f2(n)+((24/3703)*y2[n]-(24/3703)*y2[n+1]+(48/18515)*f2(n+2)*h+(8/55545)*f2(n+1)*h-(116/55545)*F2(n+2)*h^2+(208/55545)*h*f2(n))*u^2+((901/2980915)*y2[n]-(901/2980915)*y2[n+1]+(7109/89427450)*f2(n+2)*h+(923/14904575)*f2(n+1)*h-(6241/89427450)*F2(n+2)*h^2+(14383/89427450)*h*f2(n))*u^4+((1979723/158376013950)*y2[n]-(1979723/158376013950)*y2[n+1]+(6364571/2375640209250)*f2(n+2)*h+(728327/215967291750)*f2(n+1)*h-(11785633/4751280418500)*F2(n+2)*h^2+(5106559/791880069750)*h*f2(n))*u^6+((6488435581/13259239887894000)*y2[n]-(6488435581/13259239887894000)*y2[n+1]+(8693517709/91794737685420000)*f2(n+2)*h+(260601208141/1789997384865690000)*f2(n+1)*h-(323357994149/3579994769731380000)*F2(n+2)*h^2+(891627999937/3579994769731380000)*h*f2(n))*u^8+((25090513463/1343541160668420000)*y2[n]-(25090513463/1343541160668420000)*y2[n+1]+(190450718149/55421072877572325000)*f2(n+2)*h+(47563947061/8210529315195900000)*f2(n+1)*h-(1475729910283/443368583020578600000)*F2(n+2)*h^2+(261738159769/27710536438786162500)*h*f2(n))*u^10+((244426606265778733/347060946154014557665200000)*y2[n]-(244426606265778733/347060946154014557665200000)*y2[n+1]+(1316372988977975777/10411828384620436729956000000)*f2(n+2)*h+(105391490263288387/473264926573656214998000000)*f2(n+1)*h-(1284959669761615073/10411828384620436729956000000)*F2(n+2)*h^2+(72506125749079249/204153497737655622156000000)*h*f2(n))*u^12:

e4:=h^2*F2(n+1) = (60/23)*y2[n]-(60/23)*y2[n+1]+(25/46)*f2(n+2)*h+(32/23)*f2(n+1)*h-(4/23)*F2(n+2)*h^2+(31/46)*h*f2(n)+((209/3703)*y2[n]-(209/3703)*y2[n+1]+(1313/222180)*f2(n+2)*h+(1304/55545)*f2(n+1)*h-(131/18515)*F2(n+2)*h^2+(6011/222180)*h*f2(n))*u^2+((77491/35770980)*y2[n]-(77491/35770980)*y2[n+1]+(574843/2146258800)*f2(n+2)*h+(113536/134141175)*f2(n+1)*h-(53461/178854900)*F2(n+2)*h^2+(2258041/2146258800)*h*f2(n))*u^4+((151508243/1900512167400)*y2[n]-(151508243/1900512167400)*y2[n+1]+(1290306599/114030730044000)*f2(n+2)*h+(18919693/647901875250)*f2(n+1)*h-(113769323/9502560837000)*F2(n+2)*h^2+(4470322013/114030730044000)*h*f2(n))*u^6+((42120775181/14464625332248000)*y2[n]-(42120775181/14464625332248000)*y2[n+1]+(332746636891/734357901483360000)*f2(n+2)*h+(302396120633/298332897477615000)*f2(n+1)*h-(369019384141/795554393273640000)*F2(n+2)*h^2+(13797329479621/9546652719283680000)*h*f2(n))*u^8+((18953368786273/177347433208231440000)*y2[n]-(18953368786273/177347433208231440000)*y2[n+1]+(2430202319484337/138330997902420523200000)*f2(n+2)*h+(310803544671199/8645687368901282700000)*f2(n+1)*h-(203453960588449/11527583158535043600000)*F2(n+2)*h^2+(7380568619069419/138330997902420523200000)*h*f2(n))*u^10+((16436168060905785763/4164731353848174691982400000)*y2[n]-(16436168060905785763/4164731353848174691982400000)*y2[n+1]+(167160345356705269819/249883881230890481518944000000)*f2(n+2)*h+(461636091223370027/354948694930242161248500000)*f2(n+1)*h-(13852288092290788813/20823656769240873459912000000)*F2(n+2)*h^2+(29059878239787610409/14699051837111204795232000000)*h*f2(n))*u^12:

e5:=y3[n+2] = (7/23)*y3[n]+(16/23)*y3[n+1]+(12/23)*f3(n+2)*h+(16/23)*f3(n+1)*h-(2/23)*F3(n+2)*h^2+(2/23)*h*f3(n)+((24/3703)*y3[n]-(24/3703)*y3[n+1]+(48/18515)*f3(n+2)*h+(8/55545)*f3(n+1)*h-(116/55545)*F3(n+2)*h^2+(208/55545)*h*f3(n))*u^2+((901/2980915)*y3[n]-(901/2980915)*y3[n+1]+(7109/89427450)*f3(n+2)*h+(923/14904575)*f3(n+1)*h-(6241/89427450)*F3(n+2)*h^2+(14383/89427450)*h*f3(n))*u^4+((1979723/158376013950)*y3[n]-(1979723/158376013950)*y3[n+1]+(6364571/2375640209250)*f3(n+2)*h+(728327/215967291750)*f3(n+1)*h-(11785633/4751280418500)*F3(n+2)*h^2+(5106559/791880069750)*h*f3(n))*u^6+((6488435581/13259239887894000)*y3[n]-(6488435581/13259239887894000)*y3[n+1]+(8693517709/91794737685420000)*f3(n+2)*h+(260601208141/1789997384865690000)*f3(n+1)*h-(323357994149/3579994769731380000)*F3(n+2)*h^2+(891627999937/3579994769731380000)*h*f3(n))*u^8+((25090513463/1343541160668420000)*y3[n]-(25090513463/1343541160668420000)*y3[n+1]+(190450718149/55421072877572325000)*f3(n+2)*h+(47563947061/8210529315195900000)*f3(n+1)*h-(1475729910283/443368583020578600000)*F3(n+2)*h^2+(261738159769/27710536438786162500)*h*f3(n))*u^10+((244426606265778733/347060946154014557665200000)*y3[n]-(244426606265778733/347060946154014557665200000)*y3[n+1]+(1316372988977975777/10411828384620436729956000000)*f3(n+2)*h+(105391490263288387/473264926573656214998000000)*f3(n+1)*h-(1284959669761615073/10411828384620436729956000000)*F3(n+2)*h^2+(72506125749079249/204153497737655622156000000)*h*f3(n))*u^12:
e6:=h^2*F3(n+1) = (60/23)*y3[n]-(60/23)*y3[n+1]+(25/46)*f3(n+2)*h+(32/23)*f3(n+1)*h-(4/23)*F3(n+2)*h^2+(31/46)*h*f3(n)+((209/3703)*y3[n]-(209/3703)*y3[n+1]+(1313/222180)*f3(n+2)*h+(1304/55545)*f3(n+1)*h-(131/18515)*F3(n+2)*h^2+(6011/222180)*h*f3(n))*u^2+((77491/35770980)*y3[n]-(77491/35770980)*y3[n+1]+(574843/2146258800)*f3(n+2)*h+(113536/134141175)*f3(n+1)*h-(53461/178854900)*F3(n+2)*h^2+(2258041/2146258800)*h*f3(n))*u^4+((151508243/1900512167400)*y3[n]-(151508243/1900512167400)*y3[n+1]+(1290306599/114030730044000)*f3(n+2)*h+(18919693/647901875250)*f3(n+1)*h-(113769323/9502560837000)*F3(n+2)*h^2+(4470322013/114030730044000)*h*f3(n))*u^6+((42120775181/14464625332248000)*y3[n]-(42120775181/14464625332248000)*y3[n+1]+(332746636891/734357901483360000)*f3(n+2)*h+(302396120633/298332897477615000)*f3(n+1)*h-(369019384141/795554393273640000)*F3(n+2)*h^2+(13797329479621/9546652719283680000)*h*f3(n))*u^8+((18953368786273/177347433208231440000)*y3[n]-(18953368786273/177347433208231440000)*y3[n+1]+(2430202319484337/138330997902420523200000)*f3(n+2)*h+(310803544671199/8645687368901282700000)*f3(n+1)*h-(203453960588449/11527583158535043600000)*F3(n+2)*h^2+(7380568619069419/138330997902420523200000)*h*f3(n))*u^10+((16436168060905785763/4164731353848174691982400000)*y3[n]-(16436168060905785763/4164731353848174691982400000)*y3[n+1]+(167160345356705269819/249883881230890481518944000000)*f3(n+2)*h+(461636091223370027/354948694930242161248500000)*f3(n+1)*h-(13852288092290788813/20823656769240873459912000000)*F3(n+2)*h^2+(29059878239787610409/14699051837111204795232000000)*h*f3(n))*u^12:

e7:=y4[n+2] = (7/23)*y4[n]+(16/23)*y4[n+1]+(12/23)*f4(n+2)*h+(16/23)*f4(n+1)*h-(2/23)*F4(n+2)*h^2+(2/23)*h*f4(n)+((24/3703)*y4[n]-(24/3703)*y4[n+1]+(48/18515)*f4(n+2)*h+(8/55545)*f4(n+1)*h-(116/55545)*F4(n+2)*h^2+(208/55545)*h*f4(n))*u^2+((901/2980915)*y4[n]-(901/2980915)*y4[n+1]+(7109/89427450)*f4(n+2)*h+(923/14904575)*f4(n+1)*h-(6241/89427450)*F4(n+2)*h^2+(14383/89427450)*h*f4(n))*u^4+((1979723/158376013950)*y4[n]-(1979723/158376013950)*y4[n+1]+(6364571/2375640209250)*f4(n+2)*h+(728327/215967291750)*f4(n+1)*h-(11785633/4751280418500)*F4(n+2)*h^2+(5106559/791880069750)*h*f4(n))*u^6+((6488435581/13259239887894000)*y4[n]-(6488435581/13259239887894000)*y4[n+1]+(8693517709/91794737685420000)*f4(n+2)*h+(260601208141/1789997384865690000)*f4(n+1)*h-(323357994149/3579994769731380000)*F4(n+2)*h^2+(891627999937/3579994769731380000)*h*f4(n))*u^8+((25090513463/1343541160668420000)*y4[n]-(25090513463/1343541160668420000)*y4[n+1]+(190450718149/55421072877572325000)*f4(n+2)*h+(47563947061/8210529315195900000)*f4(n+1)*h-(1475729910283/443368583020578600000)*F4(n+2)*h^2+(261738159769/27710536438786162500)*h*f4(n))*u^10+((244426606265778733/347060946154014557665200000)*y4[n]-(244426606265778733/347060946154014557665200000)*y4[n+1]+(1316372988977975777/10411828384620436729956000000)*f4(n+2)*h+(105391490263288387/473264926573656214998000000)*f4(n+1)*h-(1284959669761615073/10411828384620436729956000000)*F4(n+2)*h^2+(72506125749079249/204153497737655622156000000)*h*f4(n))*u^12:

e8:=h^2*F4(n+1) = (60/23)*y4[n]-(60/23)*y4[n+1]+(25/46)*f4(n+2)*h+(32/23)*f4(n+1)*h-(4/23)*F4(n+2)*h^2+(31/46)*h*f4(n)+((209/3703)*y4[n]-(209/3703)*y4[n+1]+(1313/222180)*f4(n+2)*h+(1304/55545)*f4(n+1)*h-(131/18515)*F4(n+2)*h^2+(6011/222180)*h*f4(n))*u^2+((77491/35770980)*y4[n]-(77491/35770980)*y4[n+1]+(574843/2146258800)*f4(n+2)*h+(113536/134141175)*f4(n+1)*h-(53461/178854900)*F4(n+2)*h^2+(2258041/2146258800)*h*f4(n))*u^4+((151508243/1900512167400)*y4[n]-(151508243/1900512167400)*y4[n+1]+(1290306599/114030730044000)*f4(n+2)*h+(18919693/647901875250)*f4(n+1)*h-(113769323/9502560837000)*F4(n+2)*h^2+(4470322013/114030730044000)*h*f4(n))*u^6+((42120775181/14464625332248000)*y4[n]-(42120775181/14464625332248000)*y4[n+1]+(332746636891/734357901483360000)*f4(n+2)*h+(302396120633/298332897477615000)*f4(n+1)*h-(369019384141/795554393273640000)*F4(n+2)*h^2+(13797329479621/9546652719283680000)*h*f4(n))*u^8+((18953368786273/177347433208231440000)*y4[n]-(18953368786273/177347433208231440000)*y4[n+1]+(2430202319484337/138330997902420523200000)*f4(n+2)*h+(310803544671199/8645687368901282700000)*f4(n+1)*h-(203453960588449/11527583158535043600000)*F4(n+2)*h^2+(7380568619069419/138330997902420523200000)*h*f4(n))*u^10+((16436168060905785763/4164731353848174691982400000)*y4[n]-(16436168060905785763/4164731353848174691982400000)*y4[n+1]+(167160345356705269819/249883881230890481518944000000)*f4(n+2)*h+(461636091223370027/354948694930242161248500000)*f4(n+1)*h-(13852288092290788813/20823656769240873459912000000)*F4(n+2)*h^2+(29059878239787610409/14699051837111204795232000000)*h*f4(n))*u^12:

# Display of the solutions


h:=evalf(Pi/6):

omega:=1.0:
u:=omega*h:
N:=solve(h*p = 12*Pi/6, p):
n:=0:

exy1:= [seq](eval(cos(i)+0.0005*i*sin(i)), i=h..N,h):
exy2:= [seq](eval(-0.9995*sin(i)+0.0005), i=h..N,h):
exy3:= [seq](eval(sin(i)-0.0005*i*cos(i)), i=h..N,h):
exy4:= [seq](eval(0.9995*sin(i)+0.0005*i*sin(i)), i=h..N,h):

iny1:=1:
iny2:=0:
iny3:=0:
iny4:=0.9995:

err1 := Vector(N):
err2 := Vector(N):
c:=1:
inx:=0:
vars := y1[n+1],y1[n+2],y2[n+1],y2[n+2],y3[n+1],y3[n+2],y4[n+1],y4[n+2]:
for j from 0 to 2 do
    x[j]:=inx+j*h:
end do:
printf("%4s%9s%9s%9s%9s%9s%9s%10s%10s%9s%9s%9s%10s\n",
    "h","numy1","numy2","numy3","numy4",
    "exy1","exy2","exy3","exy4",
    "erry1","erry2","erry3","erry4");
    
st := time():
for k from 1 to N/2 do
    param1:=y1[n]=iny1,y2[n]=iny2,y3[n]=iny3,y4[n]=iny4:
    param2:=t[n]=x[0],t[n+1]=x[1],t[n+2]=x[2]:
    
    res:=eval(<vars>, fsolve(eval({e||(1..8)},[param1,param2]),{vars})):
    
    for i from 1 to 2 do
        printf("%5.2f%9.3f%9.3f%9.3f%9.3f %8.5f%10.5f%10.5f%10.5f %8.2g%9.3g%9.3g%8.3g\n",
        h*c,res[i],res[i+2],res[i+4],res[i+6],
        exy1[c],exy2[c],exy3[c],exy4[c],
        abs(res[i]-exy1[c]),abs(res[i+2]-exy2[c]),abs(res[i+4]-exy3[c]),abs(res[i+6]-exy4[c])):

        err1[c] := abs(evalf(res[i]-exy1)):
        err2[c] := abs(evalf(res[i+4]-exy3)):
        c:=c+1:
    end do:
    iny1:=res[2]:
    iny2:=res[4]:
    iny3:=res[6]:
    iny4:=res[8]:
    inx:=x[2]:
    for j from 0 to 2 do
        x[j]:=inx+j*h:
    end do:
end do:
v:=time() - st;
printf("Maximum error is %.13g", max(err1));
printf("Maximum error is %.13g", max(err2));

 

1 2 3 4 5 6 7 Last Page 2 of 201