dharr

Dr. David Harrington

8330 Reputation

22 Badges

21 years, 3 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@2cUniverse I didn't understand your resolution comments. You could add the white frame as a rectangle behind all elements before exporting the plot in whatever format you want at whatever resolution you want (or as svg or eps vector graphics to later convert to tiff)

Edit: Following makes a square SVG with a white frame.

restart;

Make some square svg files with white frame

for i to 3 do
  sq:=plottools:-rectangle([-1,-1],[1,1],color=red);
  lbl:=plots:-textplot([0,0,convert(i,string)]);
  whitebg:=plottools:-rectangle([-1.1,-1.1],[1.1,1.1],color=white);
  plt:=plots:-display([sq,whitebg,lbl],axes=none,scaling=constrained,size=[0.5,"square"]);
  Export(cat("plt",i,".svg"),plt,base=worksheetdir,format="SVG");
  #print(plt);
end do:

NULL

Download makesvg.mw

@2cUniverse I can't access your zip file. But here is how to make square format .png files (I used Export) - note the size option to give the number of pixels.

restart;

Make some png files

for i to 3 do
  sq:=plottools:-rectangle([-1,-1],[1,1],color=red);
  lbl:=plots:-textplot([0,0,convert(i,string)]);
  Export(cat("plt",i,".png"),plots:-display(sq,lbl,axes=none,scaling=constrained,size=[500,500]),base=worksheetdir);
end do:

NULL

Download makepng.mw

Infolevel can be used to show the methods used, though the output is not always easy to understand. In this case further information about the homogeneous methods is given in the odeadvisor help pages.

restart;

Equation := int(diff(u(x), x)*v(x), x) = int(u(x)^(1/2)*v(x), x)^(-2/3);

int((diff(u(x), x))*v(x), x) = 1/(int(u(x)^(1/2)*v(x), x))^(2/3)

infolevel[dsolve]:=3;

3

Solution1:=dsolve(Equation);

Methods for first order ODEs:

--- Trying classification methods ---

trying homogeneous types:

differential order: 1; looking for linear symmetries

trying exact

-> Calling odsolve with the ODE (2*G(x)^(1/2)*v(x)+Intat(v(_a)*(diff(G(x) x))/G(x)^(1/2) _a = x))/Intat(G(x)^(1/2)*v(_a) _a = x)^(8/3) G(x) explicit [quadrature separable linear Bernoulli homogeneous]

   *** Sublevel 2 ***

   Classification methods on request

   Methods to be used are: [quadrature, separable, linear, Bernoulli, homogeneous]

   ----------------------------

   * Tackling ODE using method: quadrature

   --- Trying classification methods ---

   ----------------------------

   * Tackling ODE using method: separable

   --- Trying classification methods ---

   ----------------------------

   * Tackling ODE using method: linear

   --- Trying classification methods ---

   ----------------------------

   * Tackling ODE using method: Bernoulli

   --- Trying classification methods ---

   ----------------------------

   * Tackling ODE using method: homogeneous

   --- Trying classification methods ---

   trying homogeneous types:

<- exact successful

(3/4)*u(x)^(4/3)+Intat((2/3)*u(x)^(5/6)/(Int(u(x)^(1/2)*v(_b), _b))^(5/3), _b = x)+c__1 = 0

Odetest cannot verify this solution

odetest(Solution1,Equation);

-2*Intat(v(_b)/(Intat(v(_a), _a = _b)*(u(x)^(1/2)*Intat(v(_a), _a = _b))^(2/3)), _b = x)*(u(x)^(1/2)*(Int(v(x), x)))^(2/3)-3

NULL

Download dsolve.mw

 

@AlexShura OK, so you only entered the sequence to 512. Maple's listtoalgeq still returns fail, so I agree that the oeis result is unexpected and hard to interpret.

@AlexShura Email response (below) does not contain the polynomial in a(n). Please advise how you got that.

Greetings from The On-Line Encyclopedia of Integer Sequences! https://oeis.org/

 

> lookup 1 2 4 5 8 12 14 16 28 32 37 64 94 106 128 144 232 256 289 320

> 512 560 704 760 838 1024 1328 1536 1944 2048 2329 3104 3328 4096 4864

> 6266 6802 7168 8192 11952 15360 16384 16428 19149 28928 32768

 

a(n) = 1, 2, 4, 5, 8, 12, 14, 16, 28, 32, 37, 64, 94, 106, 128, 144, 232, 256, 289, 320, 512, 560, 704, 760, 838, 1024, 1328, 1536, 1944, 2048, 2329, 3104, 3328, 4096, 4864, 6266, 6802

 

# Direct matches

 

These sequences match the query directly.

oeis.org/search?q=1,2,4,5,8,12,14,16,28,32,37,64,94,106,128,144,232,256,289,320,512,560,704,760,838,1024,1328,1536,1944,2048,2329,3104,3328,4096,4864,6266,6802

 

oeis.org/A035001 Sorted elements of table (A035002) of a(m,n) =

                 sum(a(m-k,n), k=1..m-1)+sum(a(m,n-k), k=1..n-1).

 

    <1, 2, 4, 5, 8, 12, 14, 16, 28, 32, 37, 64, 94, 106, 128, 144, 232,

    256, 289, 320, 512, 560, 704, 760, 838, 1024, 1328, 1536, 1944, 2048,

    2329, 3104, 3328, 4096, 4864, 6266, 6802>, 7168, 8192, 11952, 15360,

    16384, 16428, 19149, 28928, 32768, 37120, 42168

 

 

# Transformations

 

These sequences match transformations of the original query.

 

T001 a(n) itself

 = 1, 2, 4, 5, 8, 12, 14, 16, 28, 32, 37, 64, 94, 106, 128, 144, 232, 256, 289, 320, 512, 560, 704, 760, 838, 1024, 1328, 1536, 1944, 2048, 2329, 3104, 3328, 4096, 4864, 6266, 6802

 

oeis.org/A035001 Sorted elements of table (A035002) of a(m,n) =

                 sum(a(m-k,n), k=1..m-1)+sum(a(m,n-k), k=1..n-1).

 

    <1, 2, 4, 5, 8, 12, 14, 16, 28, 32, 37, 64, 94, 106, 128, 144, 232,

    256, 289, 320, 512, 560, 704, 760, 838, 1024, 1328, 1536, 1944, 2048,

    2329, 3104, 3328, 4096, 4864, 6266, 6802>, 7168, 8192, 11952, 15360,

    16384, 16428, 19149, 28928, 32768, 37120, 42168

 

 

# Transformations as Deltas

 

The deltas of these sequences match transformations of the original query.

 

T018 a(n+1) - a(n)

 = 1, 2, 1, 3, 4, 2, 2, 12, 4, 5, 27, 30, 12, 22, 16, 88, 24, 33, 31, 192, 48, 144, 56, 78, 186, 304, 208, 408, 104, 281, 775, 224, 768, 768, 1402, 536 (as deltas)

 

oeis.org/A035001 Sorted elements of table (A035002) of a(m,n) =

                 sum(a(m-k,n), k=1..m-1)+sum(a(m,n-k), k=1..n-1).

 

    <1, 2, 4, 5, 8, 12, 14, 16, 28, 32, 37, 64, 94, 106, 128, 144, 232,

    256, 289, 320, 512, 560, 704, 760, 838, 1024, 1328, 1536, 1944, 2048,

    2329, 3104, 3328, 4096, 4864, 6266, 6802>, 7168, 8192, 11952, 15360,

    16384, 16428, 19149, 28928, 32768, 37120, 42168

 

 

In transformation descriptions,

Sn(z) denotes the ordinary generating function with coefficients a(n), and

En(z) denotes the exponential generating function with coefficients a(n).

 

___________________________________________________________________________

 

o  You can look up sequences online at the OEIS web site https://oeis.org/ o  For an explanation of the format used in the OEIS,

     see https://oeis.org/wiki/Style_Sheet o  If your sequence was not in the OEIS and is of general interest,

     please submit it using the submission form https://oeis.org/Submit.html o  The email address <sequences@oeis.org> does a simple lookup in the

   On-Line Encyclopedia of Integer Sequences, a limited form of the search

   available on the web site.

o  If you send an empty message, you will be sent the help file.

 

    Sequentially yours,

    The On-Line Encyclopedia of Integer Sequences.

    Maintained by The OEIS Foundation Inc., https://oeisf.org.

    Please donate!

 

P.S. This content is made available under the terms of The OEIS End-User License Agreement: https://oeis.org/LICENSE

Perhaps I'm not understanding what you did, but I can't reproduce this.

A035001.mw

 

So you know that the line

printf("After iterations %d, A = %f and B = %f\n",i,b(1),b(2));

was the problem because only the i was printed out as 1, and not the b(1). So you can try print(b(1)) and see what the value was that wasn't a number.

b and c are 2x1 Matrices since you generated then differently (extra inner <>) than for Vector P and t. So b should really be indexed  b[1,1] or b[2,1]. Or just make them Vectors.

Use square brackets for indexing Matrices, just as you did with the Vectors, i.e. use b[2,1] not b(1) and J[r,2] not J(r,2). The round brackets are for advanced users.

Since your calculation is all in floating point, you can initialize b and c and t in floating point, e.g, 1.0 not 1. Then calculations that have some floating point numbers will give floating point results - you don't then need the evalfs in the for loop or the while condition.

@abdulganiy I understand from your question and clarification that you want the exact same plot as the following line of code produces

Error_plot_y1 := pointplot3d(time_t, exy1_lst, err1, style = point, symbol = box, color = orange,labels = [`h=1/4`,`Exact`, typeset((`Absolute Errors`))]);

except that you want to use the plot3d command and not pointplot3d. If so, that is not possible because pointplot3d allows for specifying 3 vectors, but plot3d does not. If this is not what you want then you need to be more specific.

The link in your post works, but I agree that clicking on the author of that post leads to the front page. Presumably, the author has deleted their account.

@philroe For run to run consistency you can use sort on the list. It's not always clear what order you get, but for the same list elements your should get the same order each time.

@Gharhoud That's correct. (As in @vv's first response.)

This has been improved in Maple 2023, where ExtremePoints(f(x)); returns [-1,0,2]

@JimAxon 

So this is just multiplication of each term by exp(k*2*Pi*I*(degree of that term)). So the procedure (checked against your outputs) is below. So here k=0 would give sheet1 unchanged, k=1 would give sheet2, k=2 would give sheet3. 

conjugatePuiseux:=proc(generator,k::nonnegint);
  local var,deg;
  # find indeterminate
  var:=indets(generator,'name');
  if nops(var)<>1 then
      error "unable to determine variable"
  else
      var:=var[];
  end if;
  # deg finds degree of a term
  deg:=term->diff(term,var)/term*var;
  if generator::`+` then
    map(term->term*exp(k*2*Pi*I*deg(term)),generator);
  else
    generator*exp(k*2*Pi*I*deg(generator)) # if only one term
  end if;
end proc:

puiseuxPlotsVer2.mw

You could just pass the variable through as a second argument, which will be more efficient if you are doing it many times.

@2cUniverse The aspect ratio does seem to be slightly different from the one exported with the context menu.

Edit: I added scaling=constrained to the display and then both the context menu export and the exportplot command gave the same aspect ratio.

@22117147 Happy to help. I added the new conjecture at the end. Keeping solutions in symbolic form removes the doubt that may exist with numerical solutions.

solvecartesian2.mw

First 40 41 42 43 44 45 46 Last Page 42 of 87