Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

As you can see in the code, I am trying to print the solution of the ODE using the Homotopy perturbation method for N = 10 ( f[0] till f[10]), but Maple is only printing f[0],f[1], and the rest of the terms are not printed out, what could cause this issue to take place?

``` 
 
restart;
N := 10:
  F(Y) :=  add(p^i*f[i](Y), i = 0..N);
  HPMEq := (1 - p)*diff(F(Y), Y $ 4) + p*(diff(F(Y), Y $ 4) + R*(diff(F(Y), Y $ 3)*F(Y)- diff(F(Y), Y $ 2)*diff(F(Y), Y $ 1))-G*diff(F(Y), Y $ 2));
    sol:=[]:
  for i from 0 to N do
      sol:= [ sol[],
              dsolve
              ( [ eval
                  ( coeff(HPMEq, p, i) = 0,
                    sol
                  ),
                  f[i](0) = -a,
                  f[i](1) = -b,
                  D(f[i])(0) = B * D(D(f[i]))(0),
                  D(f[i])(1) = -B * D(D(f[i]))(1)
                ]
              )
            ];
end do:
sol;

```
Please kindly try to run this code in your Maple version and tell me if all terms are printed.

How I can obtain system (21) in the following pdf file?
In the first step several changes of variables are done to obtain the system (20),
then changes the variables again repeated in the neighborhood (w1 *, w2 *) to gain Eq 21.
I have 3 questuin:
1-The change of variables performed in the neighborhood (w1 *, w2 *)
for system (20) or for system (7) ???
2-What does it mean in the neighborhood (w1 *, w2 *)?
3- How did obtaun Eq (21)?

[upload link replaced by moderator, as violation of Term of Use]

[paperhub.ir]10.1016@j.neucom.2010.06.023.pdf

 

I am using code edit region for parameters but getting this error, can someone help me to solve this issue.

 

Can anyone correct me, what's wrong with it.

 

Help_solution.mw

 

 

Here is a simple example which generates a loss of the connection to the kernel.

A few words to help you understand what this simplified code is aimed to do.
The inputs are:

  • a matrix (10 by 2 in the example given above), 
  • a "slave" column p,
  • a "master" column q,
  • a list of rangesr.

Let nr the number of elements of r.
The goal is to separate the elements of M[.. ,p] in nr sorted lists L1, ..., Lnr according to the rule

  • M[n ,p] is in Lk  if M[n ,q] is in r[k]  

A notional example is given in the snippet code below.
The variable num contains nr lists, the kth one contains the values of such that M[n ,q] is in r[k] .

As soon as one element of num is empty list the line S := ... generates the Connection to Kernel lost message.

I have made sure that this no longer happens by coding more carefully.

However, since some recent posts have mentioned this type of connection loss (usually difficult to trace), I thought it might be useful to publish this example (a census of connection loss situations might help make Maple more robust)

restart
interface(version)
Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895

LTB := ListTools:-BinaryPlace:
 
M  := LinearAlgebra:-RandomMatrix(10, 2):
p  := 1:
q  := 2:
r  := [-100..-1, -1..1, 1..100]:
nr := numelems(r):

Y_x, Y_ix := sort(M[.., q] , output=[sorted, permutation]):  
bounds    := map(u -> 1+LTB(Y_x, op(1, u))..LTB(Y_x, op(2, u)), r);
Y_nb      := map(u -> op(2, u)-op(1, u)+1, bounds);
            [2, 0, 8]

num       := [ seq(Y_ix[bounds[k]], k=1...nr) ];
            [[9, 1], [], [3, 2, 6, 7, 10, 4, 8, 5]]

S := [ seq(sort(convert(M[num[k], p], Vector)), k=1..nr) ];

KernelConnectionLost.mw

Hi there!

 

I have a procedure that compares the (2n+1)-point Gauß-Kronrod-Quadrature to the (2n+1)-point Patterson-Quadratures for a range of n. I have plotted the results (the absolute and relative error if they "exist", meaning they need to posess certain features) in a graph, however they do not look very insightful. For the lowest n, the reader gets an impression for the different accuracy of the quadrature rules, however, for higher n's, the resulting points are basically just on the x-axis with no difference to see. Is it possible to also print a math table with Maple? Something like:

 

      GKQ   PZ+   PZ-   PY 

1     1,04   1,03  1,02  1,02

2     1,09   1,04     -       -

3     1,02   1,01  1,01  1,01

4     1,03   1,02  1,01  1,01

with - meaning no existance for that particular n? I havent found anything about that on the internet, it's all about plotting.

My (long) code is this:

 

 

restart:
with(LinearAlgebra):     
with(ListTools):
with(PolynomialTools):
with(CurveFitting):
with(plots):
Plotting:=proc(Unten,Oben,f,g,nUnten,nOben)::plot;

local SpeicherlisteX, SpeichervektorX, #speichert die Stützstellen
SpeichervektorXGekürzt, #streicht nicht existierende Quaraturformeln.
SpeicherlisteYAbs, SpeichervektorYAbs,  #speichert die Stützwerte des späteren Splines aus dem absoluten Quadraturfehler
SpeicherlisteYRel, SpeichervektorYRel,  #speichert die Stützwerte des späteren Splines aus den relativen Quadraturfehler
î, #Laufvariable  
InterpolationsfunktionAbs, #speichert den Spline aus dem absoluten Interpolationsfehler                      
InterpolationsfunktionRel, #speichert den Spline aus den relativen Fehlern von f
GraphAbsGK, GraphAbsPY, GraphAbsPZP, GraphAbsPZM, #speichert den Graphen aus dem Spline aus dem absoluten Interpolationsfehler          GraphRelGK, GraphRelPY, GraphRelPZP, GraphRelPZM, #speichert den Graphen aus dem Spline aus den relativen Fehlern  von f  
PunkteAbsGK, PunkteAbsPY, PunkteAbsPZP, PunkteAbsPZM,#speichert den Punktgraphen aus dem absoluten Interpolationsfehler
PunkteRelGK, PunkteRelPY, PunkteRelPZP, PunkteRelPZM, #speichert den Punktgraphen aus dem absoluten Interpolationsfehler
NichtexistenzGK, NichtexistenzPY, NichtexistenzPZP, NichtexistenzPZM, #speichert die Häufigkeit der Nichtexistenz

p,i,c,d,e,Hn,Koeffizienten,s,j,M,V,S,K,nNeu,Em,Hnm,KnotenHnm,KoeffizientenHnm,h0,b,gxi,Gewichte,Delta,Ergebnis,
Endergebnis,Koeffizient,Rest,a,VorgegebeneKnoten,TatsächlicherWert, DoppelterKnoten, KomplexerKnoten,

Text:= proc() #Prozedur zum Schreiben der Ausgabe
uses T= Typesetting;
     T:-mrow(seq(`if`(e::string, T:-mn(e), T:-Typeset(T:-EV(e))), e= [args]))
end proc,
OrtPol:= proc(G,N)::list; #Prozedur zum Berechnen der benötigten orthogonalen Polynome
  local q,r,R;
  q[-1]:=0;
  q[0]:=1;
 
  for r from 1 to N do
  q[r]:=(x^r-add(evalf(Int(x^r*q[R]*G,x=(-1)..1))*q[R]/evalf(Int(q[R]^2*G,x=(-1)..1)),R=0..r-1));
  end do;
  return(fsolve(q[N]));
end proc,
BasenwechselNormiert:=proc(Dividend, m)::list; #stellt ein gegebenes Polynom über eine Linearkombination der orthogonalen Polynome #dar.
   local BasenwechselNormiert;
 
  Koeffizient:=quo(Dividend, p[m],x);

  Rest:=rem(Dividend, p[m],x);
 
  if m=0 then
    BasenwechselNormiert:=[Koeffizient*evalf(Int(g*p[m]^2,x=Unten..Oben))];
  else

    BasenwechselNormiert:=[Koeffizient*evalf(Int(g*p[m]^2,x=Unten..Oben)),op(procname(Rest,m-1))];
   
  end if;
 
  end proc,
    Basenwechsel:=proc(Dividend, m)::list; #stellt ein gegebenes Polynom über eine Linearkombination der orthogonalen Polynome dar.
   local Basenwechsel;
 
  Koeffizient:=quo(Dividend, p[m],x);

  Rest:=rem(Dividend, p[m],x);
 
  if m=0 then
    Basenwechsel:=[Koeffizient];
  else

    Basenwechsel:=[Koeffizient,op(procname(Rest,m-1))];
   
  end if;
 
  end proc,
Erweiterung:= proc(Unten, Oben, f,g,Liste,n)::real; #Prozedur zur Berechnung der optimalen Erweiterung nach Knotenvorgabe
  #Unten:= Untere Intervallgrenze; Oben:= Obere Intervallgrenze; f:= zu integrierende Funktion;
  #g:= Gewicht; Liste:= Liste der alten Knoten, n:= Anzahl hinzuzufügender Knoten;
 
 
 
Hn:=mul(x-Liste[i],i=1..numelems(Liste));

 Koeffizienten:=FromCoefficientList(BasenwechselNormiert(Hn,numelems(Liste)+1),x,termorder=reverse); #Die Koeffizienten der orthogonalen Polynome werden hier als Koeffizienten der Monome gespeichert.

 

M:=Matrix(n,n); #Beginn der Erstellung eines linearen Gleichungssystems, dessen Lösung die Koeffizienten der orthogonalen Polynome sind, deren Summe Em die hinzuzufügenden Knoten als Nullstellen hat.
V:=Vector(n);
 
  for s from 0 to n-1 do
    for j from 0 to s do
      M(s+1,j+1):=add(coeff(a[s][j],x,k)*coeff(Koeffizienten,x,k),k=0..n);
      if s<>j then
        M(j+1,s+1):=M(s+1,j+1);
      end if;
    end do;
    
    M(s+1,n+1):=add(coeff(a[n][s],x,k)*coeff(Koeffizienten,x,k),k=0..n);
    
    
  end do;

S:=LinearSolve(M,V);
K:=evalindets(S,name,()->2);


Em:=add(p[i]*K[i+1],i=0..n); #Erstellen von Em, dessen Nullstellen die hinzuzufügenden Knoten sind
Hnm:=Hn*Em; #Erstellen von Hnm, welches alle Knoten als Nullstelle besitzt
KnotenHnm:=fsolve(Hnm,complex); #Knotenberechnung

 

if (KnotenHnm[1]<-1-10^(-10)) or (KnotenHnm[n+numelems(Liste)]>1+10^(-10)) then
  return(false)
else
KomplexerKnoten:=false;
for i from 1 to n+numelems(Liste) do

 if(Im(KnotenHnm[i])>10^(-10)) then
  KomplexerKnoten:=true
 end if;
end do;
if KomplexerKnoten=true then
  return(false)
else
DoppelterKnoten:=false;
for i from 1 to n+numelems(Liste)-1 do
 
 if (KnotenHnm[i+1]-KnotenHnm[i]<10^(-10)) then
   DoppelterKnoten:=true
 end if;
end do;
if DoppelterKnoten=true then
 return(false)
else

 

KoeffizientenHnm:=Reverse(Basenwechsel(Hnm,n+numelems(Liste)));  #Das Polynom Hnm wird über die orthogonalen Polynome dargestellt.

h0:=evalf(Int(g,x=Unten..Oben)); #Beginn der Berechnung der Gewichte
 
b[n+numelems(Liste)+2]:=0;
b[n+numelems(Liste)+1]:=0;
  for i from 1 to nops([KnotenHnm]) do
    for j from n+numelems(Liste) by -1 to 1 do
      
      b[j]:=KoeffizientenHnm[j+1]+(d[j]+KnotenHnm[i]*c[j])*b[j+1]+e[j+1]*b[j+2];
      
    end do;
    
    gxi:=quo(Hnm,x-KnotenHnm[i],x);
   
    Gewichte[i]:=c[0]*b[1]*h0/eval(gxi,x=KnotenHnm[i]);
    
   
    Delta[i]:=c[0]*b[1];
  end do;

Ergebnis:=add(eval(f,x=KnotenHnm[k])*Gewichte[k],k=1..nops([KnotenHnm]));

Endergebnis:=Re(evalf(Ergebnis))
end if;
end if;
end if;
end proc:


p[-1]:=0;
p[0]:=1;
for i from 1 to (2*nOben+1)*2 do
  p[i]:=(x^i-add(evalf(Int(x^i*p[j]*g,x=Unten..Oben))*p[j]/evalf(Int(p[j]^2*g,x=Unten..Oben)),j=0..i-1)); #Berechnung einer Folge orthogonaler Polynome bezüglich der gegebenen Gewichtsfunktion und des gegebenes Intervalles
 
c[i-1]:=coeff(p[i],x,i)/coeff(p[i-1],x,i-1); #Berechnung der dreigliedrigen Rekursion der errechneten orthogonalen Polynome
d[i-1]:=(coeff(p[i],x,(i-1))-c[i-1]*coeff(p[i-1],x,(i-2)))/coeff(p[i-1],x,(i-1));
if i <> 1 then
  e[i-1]:=coeff(p[i]-(c[i-1]*x+d[i-1])*p[i-1],x,i-2)/coeff(p[i-2],x,i-2);
else
  e[i-1]:=0;
end if;
end do;

a[0][0]:=1; #Beginn der Berechnung der orthogonalen Produkterweiterungen, die Koeffizienten der orthogonalen Polynome werden wieder über die Monome gespeichert (2*x^2+2 bedeutet bspw. [2,0,2,0,0...] für die Koeffizienten)
a[1][0]:=x;
a[1][1]:=-e[1]*c[0]/c[1]+(d[0]-d[1]*c[0]/c[1])*x+c[0]/c[1]*x^2;
for s from 2 to 2*nOben+1 do
  a[s][0]:=x^s;
  a[s][1]:=-e[s]*c[0]/c[s]*x^(s-1)+(d[0]-d[s]*c[0]/c[s])*x^s+c[0]/c[s]*x^(s+1);
    pprint (coeff(a[s][1],x,s),as1s);
end do;
for s from 2 to 2*nOben+1 do
  for j from 2 to s do

     a[s][j]:=c[j-1]*add(coeff(a[s][j-1],x,k-1)/c[k-1]*x^k,k=abs(s-j)+2..s+j)+add((d[j-1]-c[j-1]*d[k]/c[k])*coeff(a[s][j-1],x,k)*x^k,k=abs(s-j)+1..s+j-1)-c[j-1]*add(e[k+1]*coeff(a[s][j-1],x,k+1)/c[k+1]*x^k,k=abs(s-j)..s+j-2)+e[j-1]*add(coeff(a[s][j-2],x,k)*x^k,k=abs(s-j)+2..s+j-2);

     
    
  end do;
end do;
for î from nUnten to nOben do
  VorgegebeneKnoten[î]:=OrtPol(g,î);
end do;
TatsächlicherWert:=evalf(Int(f*g,x= Unten..Oben));
GraphAbsGK:=plot([]); PunkteAbsGK:=plot([]); GraphAbsPZP:=plot([]); PunkteAbsPZP:=plot([]); GraphAbsPZM:=plot([]); PunkteAbsPZM:=plot([]); GraphAbsPY:=plot([]); PunkteAbsPY:=plot([]);
GraphRelGK:=plot([]); PunkteRelGK:=plot([]); GraphRelPZP:=plot([]); PunkteRelPZP:=plot([]); GraphRelPZM:=plot([]); PunkteRelPZM:=plot([]); GraphRelPY:=plot([]); PunkteRelPY:=plot([]);
SpeicherlisteX:=[];
SpeicherlisteYAbs:=[];
SpeicherlisteYRel:=[];
for î from nUnten to nOben do
  if Erweiterung(Unten,Oben,f,g,[VorgegebeneKnoten[î]],î+1) <> false then
    SpeicherlisteX:=[op(SpeicherlisteX),î]; #Stützstellen definieren                                   
    SpeicherlisteYAbs:=[op(SpeicherlisteYAbs),Erweiterung(Unten,Oben,f,g,[VorgegebeneKnoten[î]],î+1)-evalf(Int(f*g,   x=Unten..Oben))]; #Bestimmen des absoluten Fehlers von f für n=î
      if abs(TatsächlicherWert) > 10^(-10) then #Bestimmen des relativen Fehlers von f1 falls                                                          #dieser definiert ist
      SpeicherlisteYRel:=[op(SpeicherlisteYRel),abs(SpeicherlisteYAbs[-1]/TatsächlicherWert)];
    end if;
  end if;
end do;
if numelems(SpeicherlisteX)>0 then
  SpeichervektorX:=Vector[row](numelems(SpeicherlisteX),SpeicherlisteX);
  SpeichervektorYAbs:=Vector[row](numelems(SpeicherlisteYAbs),SpeicherlisteYAbs);
  PunkteAbsGK:= plot(SpeichervektorX,SpeichervektorYAbs,style = point, color=red, legend = ["GK"]);
    #  Generierung des Punktgraphen, der sich aus den absoluten Fehlern von f ergibt
  if numelems(SpeicherlisteX)>1 then
    InterpolationsfunktionAbs:=Spline(SpeichervektorX,SpeichervektorYAbs,n);
      #  Splines aus Stützpunkten, die sich aus den absoluten Fehlern von f ergeben
    GraphAbsGK:= plot(InterpolationsfunktionAbs, n=nUnten..nOben, color=red);
      #  Generierung des Graphen, der sich aus dem Spline aus den absoluten Fehlern von f ergibt
  end if;
end if;

if abs(TatsächlicherWert) > 10^(-10) then
  # falls der relative Fehler definiert ist analoges Vorgehen für die relativen Fehler
  if numelems(SpeicherlisteX)>0 then
    SpeichervektorYRel:=Vector[row](numelems(SpeicherlisteYRel),SpeicherlisteYRel);
    PunkteRelGK:= plot(SpeichervektorX,SpeichervektorYRel,style = point, color=red, legend = ["GK"]);
   
    if numelems (SpeicherlisteX)>1 then
      InterpolationsfunktionRel:=Spline(SpeichervektorX,SpeichervektorYRel,n);
      GraphRelGK:= plot(InterpolationsfunktionRel, n=nUnten..nOben, color=red);
    end if;
  end if;
end if;
NichtexistenzGK:=nOben-nUnten+1-numelems(SpeicherlisteX);

SpeicherlisteX:=[]; # analoges Vorgehen für PZP
SpeicherlisteYAbs:=[];
SpeicherlisteYRel:=[];
for î from nUnten to nOben do
  if Erweiterung(Unten,Oben,f,g,[-1,VorgegebeneKnoten[î]],î) <> false then
    SpeicherlisteX:=[op(SpeicherlisteX),î]; #Stützstellen definieren                                   
    SpeicherlisteYAbs:=[op(SpeicherlisteYAbs),Erweiterung(Unten,Oben,f,g,[-1,VorgegebeneKnoten[î]],î)-TatsächlicherWert]; #Bestimmen des absoluten Fehlers von f für n=î
      if abs(TatsächlicherWert) > 10^(-10) then #Bestimmen des relativen Fehlers von f1 falls                                                          #dieser definiert ist
      SpeicherlisteYRel:=[op(SpeicherlisteYRel),abs(SpeicherlisteYAbs[-1]/TatsächlicherWert)];
    end if;
  end if;
end do;
if numelems(SpeicherlisteX)>0 then
  SpeichervektorX:=Vector[row](numelems(SpeicherlisteX),SpeicherlisteX);
  SpeichervektorYAbs:=Vector[row](numelems(SpeicherlisteYAbs),SpeicherlisteYAbs);
  PunkteAbsPZP:= plot(SpeichervektorX,SpeichervektorYAbs,style = point, color=orange);
    #  Generierung des Punktgraphen, der sich aus den absoluten Fehlern von f ergibt
  if numelems(SpeicherlisteX)>1 then
    InterpolationsfunktionAbs:=Spline(SpeichervektorX,SpeichervektorYAbs,n);
      #  Splines aus Stützpunkten, die sich aus den absoluten Fehlern von f ergeben
    GraphAbsPZP:= plot(InterpolationsfunktionAbs, n=nUnten..nOben, color=orange);
      #  Generierung des Graphen, der sich aus dem Spline aus den absoluten Fehlern von f ergibt
  end if;
end if;

if abs(TatsächlicherWert) > 10^(-10) then
  # falls der relative Fehler definiert ist analoges Vorgehen für die relativen Fehler
  if numelems(SpeicherlisteX)>0 then
    SpeichervektorYRel:=Vector[row](numelems(SpeicherlisteYRel),SpeicherlisteYRel);
    PunkteRelPZP:= plot(SpeichervektorX,SpeichervektorYRel,style = point, color=orange, legend = ["PZP"]);
    
    if numelems (SpeicherlisteX)>1 then
      InterpolationsfunktionRel:=Spline(SpeichervektorX,SpeichervektorYRel,n);
      GraphRelPZP:= plot(InterpolationsfunktionRel, n=nUnten..nOben, color=orange);
    end if;
  end if;
end if;
NichtexistenzPZP:=nOben-nUnten+1-numelems(SpeicherlisteX);
SpeicherlisteX:=[];# analoges Vorgehen für PZM
SpeicherlisteYAbs:=[];
SpeicherlisteYRel:=[];
for î from nUnten to nOben do
  if Erweiterung(Unten,Oben,f,g,[VorgegebeneKnoten[î],1],î) <> false then
    SpeicherlisteX:=[op(SpeicherlisteX),î]; #Stützstellen definieren                                   
    SpeicherlisteYAbs:=[op(SpeicherlisteYAbs),Erweiterung(Unten,Oben,f,g,[VorgegebeneKnoten[î],1],î)-TatsächlicherWert]; #Bestimmen des absoluten Fehlers von f für n=î
      if abs(TatsächlicherWert) > 10^(-10) then #Bestimmen des relativen Fehlers von f1 falls                                                          #dieser definiert ist
      SpeicherlisteYRel:=[op(SpeicherlisteYRel),abs(SpeicherlisteYAbs[-1]/TatsächlicherWert)];
    end if;
  end if;
end do;
if numelems(SpeicherlisteX)>0 then
  SpeichervektorX:=Vector[row](numelems(SpeicherlisteX),SpeicherlisteX);
  SpeichervektorYAbs:=Vector[row](numelems(SpeicherlisteYAbs),SpeicherlisteYAbs);
  PunkteAbsPZM:= plot(SpeichervektorX,SpeichervektorYAbs,style = point, color=blue, legend = ["PZM"]);
    #  Generierung des Punktgraphen, der sich aus den absoluten Fehlern von f ergibt
  if numelems(SpeicherlisteX)>1 then
    InterpolationsfunktionAbs:=Spline(SpeichervektorX,SpeichervektorYAbs,n);
      #  Splines aus Stützpunkten, die sich aus den absoluten Fehlern von f ergeben
    GraphAbsPZM:= plot(InterpolationsfunktionAbs, n=nUnten..nOben, color=blue);
      #  Generierung des Graphen, der sich aus dem Spline aus den absoluten Fehlern von f ergibt
  end if;
end if;

if abs(TatsächlicherWert) > 10^(-10) then
  # falls der relative Fehler definiert ist analoges Vorgehen für die relativen Fehler
  if numelems(SpeicherlisteX)>0 then
    SpeichervektorYRel:=Vector[row](numelems(SpeicherlisteYRel),SpeicherlisteYRel);
    PunkteRelPZM:= plot(SpeichervektorX,SpeichervektorYRel,style = point, color=blue, legend = ["PZM"]);
 
    if numelems (SpeicherlisteX)>1 then
      InterpolationsfunktionRel:=Spline(SpeichervektorX,SpeichervektorYRel,n);
      GraphRelPZM:= plot(InterpolationsfunktionRel, n=nUnten..nOben, color=blue);
    end if;
  end if;
end if;
NichtexistenzPZM:=nOben-nUnten+1-numelems(SpeicherlisteX);
SpeicherlisteX:=[]; #analoges Vorgehen für PY
SpeicherlisteYAbs:=[];
SpeicherlisteYRel:=[];
for î from nUnten to nOben do
  if Erweiterung(Unten,Oben,f,g,[-1,VorgegebeneKnoten[î],1],î-1) <> false then
    SpeicherlisteX:=[op(SpeicherlisteX),î]; #Stützstellen definieren                                   
    SpeicherlisteYAbs:=[op(SpeicherlisteYAbs),Erweiterung(Unten,Oben,f,g,[-1,VorgegebeneKnoten[î],1],î-1)-TatsächlicherWert]; #Bestimmen des absoluten Fehlers von f für n=î
      if abs(TatsächlicherWert) > 10^(-10) then #Bestimmen des relativen Fehlers von f1 falls                                                          #dieser definiert ist
      SpeicherlisteYRel:=[op(SpeicherlisteYRel),abs(SpeicherlisteYAbs[-1]/TatsächlicherWert)];
    end if;
  end if;
end do;
if numelems(SpeicherlisteX)>0 then
  SpeichervektorX:=Vector[row](numelems(SpeicherlisteX),SpeicherlisteX);
  SpeichervektorYAbs:=Vector[row](numelems(SpeicherlisteYAbs),SpeicherlisteYAbs);
  PunkteAbsPY:= plot(SpeichervektorX,SpeichervektorYAbs,style = point, color=purple, legend = ["PY"]);
    #  Generierung des Punktgraphen, der sich aus den absoluten Fehlern von f ergibt
  if numelems(SpeicherlisteX)>1 then
    InterpolationsfunktionAbs:=Spline(SpeichervektorX,SpeichervektorYAbs,n);
      #  Splines aus Stützpunkten, die sich aus den absoluten Fehlern von f ergeben
    GraphAbsPY:= plot(InterpolationsfunktionAbs, n=nUnten..nOben, color=purple);
      #  Generierung des Graphen, der sich aus dem Spline aus den absoluten Fehlern von f ergibt
  end if;
end if;

if abs(TatsächlicherWert) > 10^(-10) then
  # falls der relative Fehler definiert ist analoges Vorgehen für die relativen Fehler
  if numelems(SpeicherlisteX)>0 then
    SpeichervektorYRel:=Vector[row](numelems(SpeicherlisteYRel),SpeicherlisteYRel);
    PunkteRelPY:= plot(SpeichervektorX,SpeichervektorYRel,style = point, color=purple, legend = ["PY"]);

    if numelems (SpeicherlisteX)>1 then
      InterpolationsfunktionRel:=Spline(SpeichervektorX,SpeichervektorYRel,n);
      GraphRelPY:= plot(InterpolationsfunktionRel, n=nUnten..nOben, color=purple);
    end if;
  end if;
end if;
NichtexistenzPY:=nOben-nUnten+1-numelems(SpeicherlisteX);
print(display({GraphAbsGK,PunkteAbsGK,GraphAbsPZP,PunkteAbsPZP, GraphAbsPZM,PunkteAbsPZM, GraphAbsPY,PunkteAbsPY}, title= "Absoluter Fehler", titlefont=["ROMAN",18]));
if abs(TatsächlicherWert) > 10^(-10) then
  print(display({GraphRelGK,PunkteRelGK,GraphRelPZP,PunkteRelPZP, GraphRelPZM,PunkteRelPZM, GraphRelPY,PunkteRelPY}, title= "Relativer Fehler", titlefont=["ROMAN",18]));
end if;
Text("Häufigkeit der Nichtexistenz: GK ",NichtexistenzGK, ", PZP ",NichtexistenzPZP, ", PZM ", NichtexistenzPZM, ", PY ", NichtexistenzPY);
      
 end proc

 

An example of how it should not look like is this:

Plotting(-1,1,2*x^2+2,1,3,10)

 

On a side note, Maple's return is

Warning, `GraphRelGK` is implicitly declared local to procedure `Plotting`
Warning, `GraphRelPZP` is implicitly declared local to procedure `Plotting`
Warning, `GraphRelPZM` is implicitly declared local to procedure `Plotting`
Warning, `GraphRelPY` is implicitly declared local to procedure `Plotting`


even though I did declare them.

 

Any suggestions on that minor issue? And on how to construct a math table which allows for a symbol like - for nonexistence?

 

Thank you in advance!

So I recently bought a new desktop with Windows 10 installed. The problem is hard to describe so I put a picture. This problem occurs randomly (Mostly occurs after I click the right button, when browsing the option in the pop-up toolbar).

When this problem happens, if I move my mouse to any toolbar which suppose to pop-up a toolbar, the pop-up toolbar wont disspear. And ultmately leads to the picture I showned above.

Sorry for the bad explaintion but it is just like I said, it is hard to describe the problem. This PC arrives around Christmas and I downloaded Maple last week. And it never have been normal. This issue also happens to NetLogo (A model simulation software).

I asked DELL's technique services and they did a remote control to help me fix the issue. However, the problem doesn't solved (They worked on this for about 3 hours). It seems the only choice I have is to reinstall the Windows. 

Does anyone have met this problem or know who met it before? Please let me know and I'm really appreciate it.

 

 

Hello,

I would like to define two vectors in spherical coordinates (preferably using Physics[Vectors] package) such that these two vectors have the magnitudes of r1 and r2, resepctively, but pointing in different directions.

In Physics[Vectors] package, basis vectors _r,_theta,_phi are predefined. So, I cannot define the vectors as r1_:=r1*_r1 and r2_:=r2*_r2 and use all the cool features of physics package.

I will eventually be needing the norm of the difference of these vectors at a later calculation, but this representation turned out to be a problem.

I am avoiding to define these vectors  in cartesian basis with spherical coordinates such as r1_=r1*(sin(theta1)*cos(phi1) i + sin(theta1)*sin(phi1) j + cos(theta1) k), etc. which is a work around. 

How can I do this in Maple?

Thank you.

 

 

 

Im new to Maple. My instructor asked us to use it, but I can't find a student free version, please help.

I was trying to use the idea explained in this post (), using `densityplot` to create a barplot. But there are several difficultes specially using new Maple that has problem with exporting plots in pdf format the same as displayed inside Maple.

The example code:

zmin := 0;
zmax := 1;
verthuebar := plots:-densityplot(z, dummy = 0 .. 1, z = zmin .. zmax, grid = [2, 10], style = patchnogrid, size = [90, 260], colorscheme = [ColorTools[Color]([0, 0, 1]), ColorTools[Color]([1, 0, 0])], style = surface, axes = frame, labels = [``, ``], axis[1] = [tickmarks = []], axis[2] = [tickmarks = [aList[1] = "0   ", 0.5 = typeset(alpha*` `), 1 = "1    "]]);

Problems:

1- When I export the bar-plot as `.eps`, it shows white lines as a grid, while I don't want it and it is not the same way it is displayed at Maple! 

test-1.pdf

I tried adding `gridlines=false` and other similar things, but had no effect. I changed `10` to `3` in `grid = [2, 10]`, but it increases the distance of 0 and 1 from the borderies and therefore wrong numbers will be read from the color bar. Exporting the picture as `.pdf` doesn't have that gridlines problem, but destroys the proportions of the image, so I want to stick on the `.eps` one, but without those white lines.

2- How can I have 0 and 1 exactly on the start and end of the color bar and with no distance from the edges? I can use `view=[0..1,0..1]` at the end of the above code, but depending on the number in the `grid=[2,n]` that I choose, the colors may not start and end exactly at the specified colors.

There is the following differential equation:

 

where l(t)=2+t,  g=10 and the goal is to find φ(t). I wrote the following code:

M := diff(phi(t), t);

M1 := diff(M, t);
g := 10;
M2 := diff(l(t), t);
ode := M1 + 2*M2*M/l(t) + g*sin(phi(t))/l(t) = 0;
ics := phi(0) = 1, D(phi)(0) = 1;
l := t -> 2 + t;
ode;
dsovle([ode, ics]);
 

But I don't get any result. How can I solve this differential equation?

I just got a "new" graphics card, NVIDIA GT630, and was wondering whether the CUDA capabilities are accessible. But no luck:

CUDA:-Enable();

Error, (in CUDA:-Enable) CUDA not supported on the current system (see CUDA,supported_hardware for more information)

The CUDA help page with the example, when run, just shows a host of error messages.

I have OS X 10.11.6, the above mentioned GT630 card with claimed 384 CUDA cores and 2 GB of VRAM; NVIDIA WebDriver 346.03.15f16 for the card (i.e. latest for this OS) and NVIDIA CUDA driver 8.0.90 (again, latest for this OS as far as I can tell). My Maple is 2015.2. All this running on a MacPro 4,1.

I am not having great illusions about the performance I should get (this is not a state-of-the-art card today), but it seems to me this combination should be working with Maple 2015 and not throw an error, shouldn't it? Checking the system extensions: CUDA.kext is loaded and its dependencies are satisfied, so I don't see any problem there.

Am I missing something?

M.D.

I'm having an issue with Maple 2020.2 classic interface being *very* slow on a new MacBook pro with Big Sur. It takes about 1 second between each keystroke and it appearing on the screen. 

Is this a known bug?

I want to read file dates (for data files) from inside Maple.  Specifically, I want to automate the comparison of access dates.

I thought I'd done this in the past, but my attempt to recreate it has led me to think that I am remembering incorrectly.

Is there a way of doing this?

I don't deeply care about portability (I'm working on Windows 10 and that would be good enough), but since I'm asking the question please comment on the easiest way to make this portable.

I am aware that by default Windows 10 doesn't update the access date.  On the machines I care about, I have changed the configuration so Windows is updating the access date (often enough for my purposes).  I have PowerShell scripts that work correctly.

I have several questions about Grid Toolbox. I am getting into distributed computing for a very large problem I have been working on for a long time; I am working on the simple examples that come with the Grid package, and I am not having much success. I am fairly experienced in Maple but I need help with this. My e-mail is harrisjtster@gmail.com.

First 57 58 59 60 61 62 63 Last Page 59 of 334