MaplePrimes Questions

How I can plot the gradient of function V and then plot the result as well?

Anyone can help with the concept of these plots regard the physical aspect?

Thanks

fluid_flow_past_a_cylinder.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

Hello, I am new to Maple. Can somebody tell me what is the reason of maple being unable to integrate my equation in dsolve on dsolve2? when I try to use dsolve for solve my equation in answer of maple there are expressions of integral that is not calculated, and how to handle it?

 

Thank you

 

At my first steps in vectorcalculus i calculating a scalar line integral, but the concept how to do this is not  yet clear to me 

ecxample_4_-_blz407_toegepaste_wiskunde.mw

https://drive.google.com/file/d/1K5mnfCAB_zSzLGNNz1rkUyjvRhCgpFi4/view?usp=sharing

 

Any idea why symgen hangs when using formal algorithm on this first order ode? I was just comparing the Lie symmetries generated for this ode using different algorithms when I noticed this hang on formal.

The textbook gives this result btw

From help on symgen it says

The first algorithms, called formal, formulates a linear PDE system for the infinitesimals [xi, eta], then formally triangularize this system - using differential algebra techniques - finally tacking the resulting uncoupled system. When successful, this algorithm returns the complete set of point symmetries admitted by a given ODE of order 2 or higher. NOTE: this algorithm is advantageous mainly for 2nd and higher order ODEs. The algorithm works as well in the case of first order ODEs, but in this case the subproblems it will need to solve to find the symmetries are as difficult to solve as the first order ODE itself.
 

But on Maple 2020.1 server seems to hang, taking 100% CPU. I had to terminate mserver.exe manually since clicking on interreupt button from worksheet has no effect. This only happens with formal algoritm. All others work very fast. 

I know help says this is meant for second order ODE's, but it also says it works  well for first order.  It seems to be stuck in solve call somewhere. Is this to be expected sometimes when using formal algo in symgen for first order ode's?

Maple can solve the ODE very quickly otherwise.


The following ode also hangs in symgen

ode:=diff(y(x),x)=x*y(x)^2-2*y(x)/x-1/x^3;


 

restart;

interface(version)

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 794 and is the same as the version installed in this computer, created 2020, September 3, 23:37 hours Pacific Time.`

#hangs on formal, why?
restart;
ode:=diff(y(x),x)=(y(x)-4*x*y(x)^2-16*x^3)/(y(x)^3+4*x^2*y(x)+x);
DEtools:-symgen(ode,y(x),way=formal)

diff(y(x), x) = (y(x)-4*x*y(x)^2-16*x^3)/(y(x)^3+4*x^2*y(x)+x)

restart;
ode:=diff(y(x),x)=(y(x)-4*x*y(x)^2-16*x^3)/(y(x)^3+4*x^2*y(x)+x);
sol:=dsolve(ode,implicit)

diff(y(x), x) = (y(x)-4*x*y(x)^2-16*x^3)/(y(x)^3+4*x^2*y(x)+x)

(1/2)*y(x)^2+(1/2)*arctan((1/2)*y(x)/x)+2*x^2-_C1 = 0

 


 

Download symgen_issue_1.mw

There are 3 lists of data 

how to plot 3 lines with x axis represent time 1,2,3...

 

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

Display all lattices on a set with 3 elements.

hi

could you help me to solve this problem

dose the following problem has solution?and how can i write it in maple?

this is a problem 6 equation and 4 unknown variable

sys := 1.20710678118654752440084436211*x-.207106781186547524400844362106*y = 1, -1.20710678118654752440084436210*x+1.20710678118654752440084436210*z+.207106781186547524400844362105*y-.207106781186547524400844362105*w+1.61353108866376978508023871599*z-1.61353108866376978508023871599*w = 0, 1.41421356237309504880168872421*x-1.41421356237309504880168872421*z-1.41421356237309504880168872421*y+1.41421356237309504880168872421*w-1.37455258362134694054214893147*z-1.37455258362134694054214893147*w = 0, -1.20710678118654752440084436210*x-1.20710678118654752440084436210*z+.207106781186547524400844362105*y+.207106781186547524400844362105*w+.238978505042422844538089784517*x-.238978505042422844538089784517*y = 0, 1.41421356237309504880168872421*x+1.41421356237309504880168872421*z-1.41421356237309504880168872421*y-1.41421356237309504880168872421*w+1.37455258362134694054214893147*x-1.37455258362134694054214893147*x = 0

I wish to write 2D output strings in various colors. Normally I use printf, though I'm willing to hear other suggestions.

An optimal procedure would one where I pass it the string, and a ColorName color such as "DodgerBlue" or "xkcd blue", but I'm happy if it means passing my own hex code.  Thanks.

Hi every one

I'm having some plots in maple, but the layout is not pretty enough, I want export in to MATLAB. Does some one please have an idea on how I can go about it?.

I'm using Maple 16

Thank you in anticipation

Hi everyone.

I have a 2D function and I wanna after Differentiating from it with respect to tau (at any amount of sigma value) and equaling this derivative to zero solve the infinite system of equations.

P[n](tau)==LegendreP(n - 1/2, cosh(tau)) , Q[n](tau)==LegendreQ(n - 1/2, cosh(tau)) 

are Legendre function.

Thanks in advanced

FUNCTION_f.mw


 

"restart;:N:=3: f(sigma,tau):=(sqrt(cosh(tau)-cos(sigma)))*(&sum;)(A[n]*P[n]((tau)) -n*Q[n]((tau)) )*sin(n*sigma)"

proc (sigma, tau) options operator, arrow, function_assign; sqrt(cosh(tau)-cos(sigma))*(sum((A[n]*P[n](tau)-n*Q[n](tau))*sin(n*sigma), n = 1 .. N)) end proc

(1)

NULL

W := simplify(diff(f(sigma, tau), tau))

(1/2)*((2*A[2]*(cosh(tau)-cos(sigma))*(diff(P[2](tau), tau))+(-4*cosh(tau)+4*cos(sigma))*(diff(Q[2](tau), tau))+sinh(tau)*(A[2]*P[2](tau)-2*Q[2](tau)))*sin(2*sigma)+(2*A[3]*(cosh(tau)-cos(sigma))*(diff(P[3](tau), tau))+(-6*cosh(tau)+6*cos(sigma))*(diff(Q[3](tau), tau))+sinh(tau)*(A[3]*P[3](tau)-3*Q[3](tau)))*sin(3*sigma)+sin(sigma)*(2*A[1]*(cosh(tau)-cos(sigma))*(diff(P[1](tau), tau))+(-2*cosh(tau)+2*cos(sigma))*(diff(Q[1](tau), tau))+sinh(tau)*(A[1]*P[1](tau)-Q[1](tau))))/(cosh(tau)-cos(sigma))^(1/2)

(2)

``


 

Download FUNCTION_f.mw

 

During the computation of a series, I needed the value Psi(1/12)  of the digamma function at a rational point. 

simplify, convert/elementary or other usual convertions do not help.

But Maple knows the formula for Psi(r) when r is rational:

 

FunctionAdvisor(special_values, Psi)[24][1]: convert(%,`global`);

Psi(n+p/q) = q*(Sum(1/(k*q+p), k = 0 .. n-1))+2*(Sum(cos(2*Pi*p*k/q)*ln(sin(Pi*k/q)), k = 1 .. floor((1/2)*q+1/2)-1))-(1/2)*Pi*cot(Pi*p/q)-ln(2*q)-gamma

(1)

(simplify@value)(eval(%, [n=0, p=1, q=12]));

Psi(1/12) = ((2*3^(1/2)-6)*ln(2+3^(1/2))+(-Pi-2*gamma-6*ln(2)-3*ln(3))*3^(1/2)-Pi+2*gamma+6*ln(2)+3*ln(3))/(2*3^(1/2)-2)

(2)

evalf(%);

-12.44790533 = -12.44790533

(3)

The question is: why does not Maple use this formula when asked? Or, is there a convertion which I was missing?

 

I have written the following attached code to use Euler explicit method to solve the following IVP

diff(y(x), x) = 2*(1+x)-y(x), y(2) = 5
With Exact solution  y(x) = 2*x+exp(-x)/exp(-2)

However, I found out that my exact results are not correct while the numerical results are okay. What have I done wrong in the code? Can someone modify the code?

Thank you and kind regards.

 I recently tried using Maple 2020 to run example code for the Grid package provided in Section 15.8 of the Maple Programming Guide. Unfortunately, none of the sample code appears to work as advertised.

Firstly, when I try to run the first sequential Mandelbrot example provided, I get the following error:

Error, (in Mandelbrot:-MandelLoop) `break` outside of loop

This was easily fixed by replacing the break statement in the while with a boolean value flag, while k < iter and flag do (see attached image). With this minor change to the example provided in the manual, I was able to get the code sequential code to run in 45.743 seconds on a quad core laptop. The modifications to the sample code are highlighted in red below.

 MandelLoop := proc( X, Y, imageArray, i_low, i_high, j_low, j_high, iter, bailout )
        local flag, i, j, Xc, Yc, Xtemp, Ytemp, Xold, Yold, k, t;
        option hfloat;

        for i from i_low to i_high do
           for j from j_low to j_high do
               Xtemp := X[i];
               Ytemp := Y[j];
               Xc := Xtemp;
               Yc := Ytemp;
               k := 0;
               flag := true:
               while k < iter and flag do
                   Xold := Xtemp;
                   Yold := Ytemp;
                   Xtemp := Xold^2-Yold^2+Xc;
                   Ytemp := 2*Xold*Yold+Yc;
                   t := Xtemp^2+Ytemp^2;
                   if Xtemp^2+Ytemp^2 >= bailout then
                        imageArray[i, j, 1] := k - ln( ln( t ) )/ln(2.);
                        imageArray[i, j, 2] := imageArray[i, j, 1];
                        imageArray[i, j, 3] := imageArray[i, j, 1];
                        #break;
                        flag := false:
                  end if;
                  k := k+1;
               end do
           end do;
        end do;
    end proc:

The second, and seemingly more serious problem occurred when I tried to run the code in the last example that uses the Client/Server model to parallelise the Mandelbrot calculation. The code provided in the Programming Guide once again gives the break outside of loop error. However, after replacing the break statement in the Computeline procedure with a boolean flag as above, I found the code runs but does not enter either the Server procedure or the Computeline procedure that is actually supposed to do the work. This can be verified by including print statements in the Computeline or Server procedures. The parallelised code ran in less than one second, compared to 45 seconds for the sequential code. Unfortunately this was not due to a 45-fold speed up on my quad core laptop, but the fact that the code using the code parallelised using Grid Package did nothing whatsoever.

I have sent a number of e-mail requests to Maple Support asking them to explain these apparent errors and so far have received no response.

Any solutions to these problems from the Maple user community would be much appreciated.

Thanks.

John

First 385 386 387 388 389 390 391 Last Page 387 of 2308