Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

How to find sgn on maple?

signum.mw

Hi, I'm solving a complicated ODEs. It is a multiple point bvp. Last time I asked a question about a similar problem(you can see https://www.mapleprimes.com/questions/230626-I-Am-Trying-To-Solve-A-Set-Of-ODEs-With). And when I use the last point 's solution to obtain the next point's solution (via approxsoln=..), it works well (it's the replicate of other people's paper). But this time I changed theoretical model, so the input parameters and the equations are some different from the previous. Some problems appears again. In the code I used a loop to calculate solutions with different lambda, but the code works on some points in front, then it appears an error "initial Newton iteration is not converging". 

Do you have some ideas to overcome it?

 

dsolveODEs.mw

How to evaluate the integration when x=[-infinity , +infinity]?

integration_24sep.mw

I am trying to solve a set of ODEs with dsolve. There are 26 equations of my ODEs, but the problem is a multiple point bvp. So the range is divided into three region. In order to use dsolve, I transform the three subregion's coordinate into 0 to 1. Meanwhile, the ODEs are different in three regions, respectively. So, there are 26×3 equations in total. And according to the paper I want to replicate, it says the response is unstable,so parameter continuation is used. Similar to the paper, an additional equation is added(eq1_27 in code), also an additional condition is added(about lambda). When the lambda is less then 0.11, the dsolve works, but for other values it doesn't work. Could anyone help me?

 

Sorry for the tedious programming code, I am new to Maple.

I am trying to reproduce this fractal graphic by Daniel Geisler, using maple 18:

http://tetration.org/Tetration/index.html

I suspect the images were produced by fractint - with a floating point hardware accelerator, but I am not sure. In any case, they were produced by a numerical program, not a symbolic one and probably with 16-18 digits of accuracy.

The Maple code I use makes for a valiant effort, but is nowhere close in accuracy to the two images above. Here's the Maple 18 code:

tetrationFractal18.mw

Several questions here:

1) Geisler's image colors according to period (right graph). Period 1 is red. 2 is yellow (although not all yellow regions are period 2) 3 is green, 4 is cyan, 5 is blue, etc.

I have some period checking code in my doc, which stores the last 20 iterates of the maxIter iterations of the orbit in orb[n]  then extracts a period p, based on some backwards comparisons.

I am only interested in graphing max period up to N=20, hence the orb[1..N] array, stores only the last N elements of the iterates. This is relatively fast, but extracting the period (below) from the orb array, puts an additional strain on the overall calculations, probably of the order of O((N+p)*n) for each n in the iteration, where p is the period returned. That's why I avoid storing in orb unless the global bound "bail" has not been exceeded.

The period finding algorithm works. It rerurns p correctly, and that's the value the graphic proc returns for plot3d. The problem is that the range of values is small (p\in[1..N]) and therefore the palette in plot3d is poor. I.e., it doesn't differentiate very much between colors of different period regions. How can I spread out the color pallete with plot3d with such results? ideally, I'd like to assign colors roughly from red to violet, with period 1 red, 2 orange, 3 green, 4 blue, 5 purple, etc.

I tried returning log(p) and this spreads the zhue some, but not enough (see attached document). Further, I'd like to assign black to points which escape the calculations, such as when the bail bound is exceeded in my iteration loop. By default, these show up as "purple", which is the same as the color for period 1 with the latest implementation. How can I except these escape points from the palette, i.e. what does the fractal proc have to return to color these black? Note that for these points, orb[n] defaults to 0, so the palette colors this close to p=1 region (these are the black "hairs"/threads of the Cantor Bouquets in Geisler's second image. That's the first question.

 

Second question is, why are there "white" regions interlaced under this scheme? is the calculation failing at these points because of low resolution? (epsilon~0.01 in this doc). (If points fail "bound"=1e10 then the orbit is orb[1..N]=0, so p=1 and zhue=1?) White seems to decrease as I increase epsilon and maxIter, but i can't test further, because the calculation limit is already prohibitive for this version of Maple. The graph with a plot3d grid [400,400] and maxIter=100 and epsilon=0.01, takes around 25 minutes. Testing anything finer than than, is time uneasonable.

Would increasing Digits help with any of the above?

Does anyone have any ideas on how to improve the code performance for this graph in maple 18, as per the above problems?.

Many thanks.

I would like to "run" or execute parts of my code that I put in a same section. Unfortunately, selecting "Execute" when right-clicking on a section does nothing...

I created some simple maple 9 code to do some z->w mappings long time ago, on my web page:

https://ingalidakis.com/math/ComplexMaps.html

Upon revising my webpage, I've stumbled upon a page for comformal mappings, by David Bau:

http://davidbau.com/conformal/#exp(z)

Here's the current version of my code in Maple 18:

rrestart;
NULL;
with(plots);
xMax := 1;
yMax := 1;
N := 10;
step := abs(xMax)/N;
GL := proc (x, y) options operator, arrow; x+I*y end proc;
f := sin;
G := {};
for k from -N+1 to N+1 do

G := `union`(G, {complexplot(f(GL(x, (k-1)*step)), x = -xMax .. xMax, color = brown)});

G := `union`(G, {complexplot(f(GL((k-1)*step, y)), y = -yMax .. yMax, color = brown)})

end do;
display(G, scaling = constrained);

The code is pretty simple: I am simply scanning the 1x1 unit square complex grid and create a complex plot of it on the w-plane, by passing it through whatever function is at: f:=x.

Does anyone have any idea why the grid lines on the w-plane do not agree with Bau's grid lines mapping of the w-plane? To try it for exp for example, input "exp(z)" in Bau's home page.

The difference is quite noticeable, especially on exp and log, where the orientation of the w-grid on the left and right half-planes, seem to be opposite of what my code displays.

The reason may be Mathematical, but from what I see from the description on Bau's page, there's no difference on the identity function, so I am clueless.

Many thanks in advance

Hi guys,

an error appeared in solving a set of equations and plotting the solution, I dont know how to handle it!!

Thanks for your help

Best

 

problem.mw

Hello, I found this very strange behavior in Maple and I can't explain why this is not working

A little bit of context first:

1. I placed a polygon as a boundary for a section and then two polygons that correspond to inner holes to the first one.
2. Then I proceed to create a regular mesh that places N x M points spread across the region (OK here)
3. A procedure checks weather or not a Point is inside the region, on the borders or in the inner holes (OK here)
4. Then I want to select the closest (but exterior) ones so I can create a path using the mesh points.
 

Here is where I find the issue. I start at a vertex called V[1,1] and I want to arrive at V[1,2] (in the document they are blue solid points marked they are near-vertices near the original polygons). The procedure that I apply finds a path towards the V[1,2] as I was expecting but when the procedure hits the V[1,2] coordinates the while loop does not stop

The condition I wrote was:    while point<>V[1,2] do  where 'point' is correctly generated by another procedure.

This happens in a 40 by 50 mesh but with other configurations it works properly (there are also another kind of errors but it's inherent to lack of optimization in my procedures).

What baffles me is why doesn't it stop the cycle, if I test the condition outside the loop it DOES recognize the points are indeed equal. Is it something in Maple or is it something in my PC?

Thanks to anyone who can see the error or the problem because I don't understand the nature of the problem.

Not_Working.mw

Problem with pdsolve/numeric


Contextualizing:

I created a routine for solving a thermo-mechanical problem. The size of the spatial domain is a function of time and the thermo-mechanical behavior of the structure.

The solution is obtained by discretizing the time domain in n intervals. The thermo-mechanical responses are obtained at each time t[i] =t[i-1]+dt.

The material exhibits elastic and elastoplastic mechanical behavior and thus the problem was divided into two consecutive phases (phase 1 and 2).

The heat problem is nonlinear because the thermal properties are variable (termal conductivity, specific heat, and density).

 

The problem:

In phase 2, the pdsolve/numeric command returns an error for the solution of the heat conduction equation (equation called pde1). I believe this error is related to the derivative of thermal conductivity k(x1) (piecewise function).

I tested many alternatives (I wrote the pde1 equation in two different ways), I checked the routine many times and I don't understand the reason for the error. With each attempt, the command returns a different error.


Thanks for your attention and help.

Problem.mw

Please can someone help me out, have been trying for a very long time now on how to differentiate the lines on the graph.......please find attachment below and correct..................................................................

 

 restart;
  with(plots):
#
# Define the ODE system
#
  odeSys:= { (diff(F(eta), eta, eta, eta))*(1+epsilon-alpha((diff(F(eta), eta, eta))^2))+F(eta)*(diff(F(eta), eta, eta))+S*(diff(F(eta), eta))-(1/2)*S*eta*(diff(F(eta), eta, eta))-(diff(F(eta), eta))^2-M*(diff(F(eta), eta)), (diff(theta(eta), eta, eta))*(1+R)-delta*(diff(F(eta), eta))^2-Pr((3/2)*S*theta(eta)+(1/2)*S*eta*(diff(theta(eta), eta))-2*(diff(F(eta), eta))*theta(eta)+F*(diff(theta(eta), eta)))};
#
# Define the first set of boundary conditions
#
  bcs1:= { F(0) = 0, (D(F))(0) = 1, (D(F))(inf) = 0, theta(0) = 1, theta(inf) = 0
         }:

  RVals:=[0.1, 0.5, 1]:
  for k from 1 by 1 to numelems(RVals) do
      pList:=[ epsilon = 0.18, M = 0.5, S = 1.5, delta = 0.3, Pr = 1.5, alpha = 0.4, R = RVals[k],inf=1
]:
      sol1[k]:= dsolve( eval
                        ( `union`( odeSys, bcs1),
                           pList
                       ),
                       numeric
                     );
     od:
  display
  ( [ seq
      ( odeplot
        ( sol1[i],
          [eta, theta(eta)],
          eta=0..2
        ),
        i=1..numelems(RVals)
      )
    ],
    color = [red, green, blue],
    title = typeset( theta(eta), " versus ", eta),
    titlefont = [times, bold, 20]
  );
 

Could anyone help me out to convert the equation into differential transform method

 

Hello,

My question is quite simple yet maybe a bit hard since I understand that messing around with series can lead to dead ends.

Given a certain general term, for instance sum(x^n/n!,n=0..infinity): Can Maple recognize which function does it come from (in case such analytic function is known)? in the example I would expect it to return exp(x).

Thank you very much.

First 12 13 14 15 16 17 18 Last Page 14 of 84