tomleslie

13876 Reputation

20 Badges

15 years, 163 days

MaplePrimes Activity


These are replies submitted by tomleslie

to a problem of this type, there are three rules whihc you have to follow, itemized below

  1. Post a complete worksheet illustrating the problem using the big green up-arrow in the Mapleprimes toolbar, because "pictures" of worksheets are essentially useless
  2. Post a complete worksheet illustrating the problem using the big green up-arrow in the Mapleprimes toolbar, because "pictures" of worksheets are essentially useless
  3. Post a complete worksheet illustrating the problem using the big green up-arrow in the Mapleprimes toolbar, because "pictures" of worksheets are essentially useless

@mmcdara 

below is a screenshot of a toy example in Maple 2021.1. This behaviour does not occur in Maple 2015, or in Maple 18, which the OP claims to be using

@Hassan Ali 

You supplied the worksheet perturbation2.mw  and that is the one I used to produce  pert2.mw above, answering all of the questions you asked, ie

1-How can I generate this idea of perturbation theory on my question in maple by using for loop? means if we want to compare higher power of delta-like 2,3.... etc. 

 

2- how to test boundary conditionsNote on obtained solution u=u0+delta u1?

 

3- is it possible to compare this analytical solution numerical method?

I can't think of any reason why I should repeat the same solution method for a different problem

 

@Hassan Ali 

covers pretty much every calculation I can think of doing with this problem. Read carefully

pert3.mw

@Hassan Ali 

equation/expression in the worksheet I posted before is incorrect? Try reading it

@Hassan Ali 

attached performs (in Maple) tha manual calculation which you have performed. I make no comment of the "validity" of your "algorithm"

pert2.mw

@JAMET 

running in Maple 18 - works like a charm. The only thing I can suggest is that you

  1. download the attached worksheet drawLines3.mw
  2. run the attached worksheet using the !!! icon in the Maple toolbar
  3. save the resulting worksheet (with output) to a filename of your choosing
  4. upload the worksheet obtained at (3) above to this site using the big green up-arrow in the Mapleprimes toolbar

all twelve lines on the same plot? Even using linestyles, that is starting to look pretty "cluttered". See the attached drawLines2.mw and below

@JAMET 

this new requirement - or why it is not satisfied by my previous answer. You are going to have to specify this latest problem much more clearly

@Sradharam 

If Maple cannot find an analytic solution, I very much doubt that I would ever be able to!

"Power series" solutions for ODE systems are generally(?) only applicable to initial-value problems - an analogy is would be finding the Taylor series expansion of an algebraic function about a point. However you have a boundary-value problem with condirions defined at two points. It simply doesn't make much sense to look for a power series solution about two points.

@dharr 

that the OP needs to be using some kind of norm to establish how "close" two vectors are, I'd (probably?) go with the "Euclidean norm" rather than the "Infinity norm", since (for most people) it better represents the concept of "distance" betwen vectors - but I accept that this is a matter of "taste"

In any case for the OP's problem, the issue of which "norm" to use is a bit academic. The code provided is not an itereative process: new random vectors  are generated for each iteration through of the main loop; these new random vectotrs are then compared (?) with completely unrelated previous vectors. This is not iteration to a solution - it is, in fact, completely pointless and will never show any sign of "convergence" irrespective of the norm definition

@Sradharam 

is that Maple does not (currently?) implement either HPM or HAM as a method of solvng PDEs. If you check the Maple help at

?pdsolve/numeric/method

you will discover that Maple (currenlty?)  has eleven methods (other than the default) for solving PDEs numerically

These eleven methods are

ForwardTime1Space[backward/forward]
CenteredTime1Space[backward/forward]
BackwardTime1Space[backward/forward]
Euler/ForwardTimeCenteredSpace
CrankNicholson/CenteredTimeCenteredSpace
BackwardEuler/BackwardTimeCenteredSpace
Box[backward/forward]
LaxFriedrichs
LaxWendroff
Leapfrog
DuFortFrankel

By default, Maple will use none of the above, because the "default" method (implicit centered, finite-element) will work - for most PDE systems

In your specific case the problem was solved using Maple's default method - so why do you *want* to invoke an alternative?

In firness I shouold point out that if you type something like "HPM method in Maple" into your favourite search engine you will find a number of entries where people *claim* to have written general HPM/HAM solution methods in Maple. Feel free to try any of these.

But while I can solve your problem using methods already built-in to Maple, I can't think of any reason why I should waste my time implementing a whole new method which gives exactl;y the same answer

@mmcdara 

it's for the OP -  who may have problem implementing your suggestion

@mmcdara

I read the help for  graph definition (see ?Graph) which states

V - (optional) list of vertices (integers, symbols, or strings) or integer specifying the vertices 1,2,...,V

and I (erroneously) concluded that definening a vertex 'name' as a list of integers probably wouldn't work - although converting these to a "string", probably would. So attached ( planar2.mw ) is a revision of my original response for whihc the code is

  restart;
  with(GraphTheory):
  g:=Graph({{1,2},{2,4},{3,4},{2,3},{1,3},{1,4},{4,5},{2,5},{1,5}}):
  gDrawOpts:= stylesheet=[ vertexfontcolor="Black",
                           vertexcolor="Yellow",
                           edgecolor="Blue",
                           edgethickness=3
                         ]:
  IsPlanar(g, faces);
  DrawPlanar( g,
              gDrawOpts
            );
#
# The easy way!
#
  dual_g:=PlaneDual(g);
  DrawPlanar(dual_g,
             gDrawOpts
            );
#
# The hard way
#
# Show the list of faces of the original graph
#
  faces;
#
# When two entries in the list of faces share two
# entries this represents an edge in the dual graph.
# The following finds all the edges for a 3-connected
# graph
#
  myEdges:= { seq
              ( seq
                ( `if`
                  ( numelems
                    ( `intersect`
                      ( convert(faces[i], set),
                        convert(faces[j], set)
                      )
                    )=2,
                    convert~({faces[i], faces[j]},string),
                    NULL
                  ),
                  j=i+1..numelems(faces)
               ),
               i=1..numelems(faces)-1
             )
           };
 g2:=Graph( convert~(faces, string), myEdges);
 DrawPlanar( g2,
             gDrawOpts
           );

and the final dual graph is

By the way it is always helpful when submitting a response if you upload the complete code used to achieve it - just saves everyone a little time

 

@mmcdara 

a lot of differences in the operation of DrawGraph() between Maple 2015 and Maple 2021. For example, in the attached ( WG.mw ), the graphs are depressingly monochromatic, unless I include the the 'stylesheet' option, However the edge weights do always appear, although as the number of edges rises, their existence makes the graphs look very 'cluttered'.

This looks to me very like a 'trade-off' issue between what is an "acceptable default" and what can be reasonably specified by the user. I see this as a tricky balance to achieve. Pretty much whatever defaults Maple provided, someone would complain - so I'd live with this one

First 30 31 32 33 34 35 36 Last Page 32 of 207