Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

My personal edition of Maple 2020 throws java-lang-thread for every plot3d. No further output is provided by Maple. How can I further troubleshoot this?

Dave

Why do I get an error when using this:/// during readin of a xml attachment in Maple workbook?

Exceltools Import works without problems.

ReadXML.zip

Is there any programming or package to solve my problem. I am poor in programming. 

Thanks sincerely!

Any idea why the result of the FirstChild function of the attached file is

_XML_Text("\n  ")

Test.zip

I also miss a more complete example on Maple Help for writing, reading and processing xml files.

Hello! Sorry if this question was already asked, I just can't find my answer and I don't really know how to form the question since I'm new to using Maple. My question is: How can I find a point on a plot I did in Maple? When I use the cursor position(from when I click Probe info) I can never align it right enough for me to not get a decimal answer. For instance, I can't figure out the y-value for when x=2 because the closest I can get to 2 is like 2.1 which isn't exact enough for me. 

To practice more in documentmode
Given  f := x^2 + y^2 + z^2 = 1  
Asked: 
surfacelevel on level 1  and surfacelevel upon wich the point (sqrt(3), 3, -2) is located.


1) x^2 + y^2 + z^2 = 1   : what solid ( a sphere with radius 1)  and  plot 
2) surfacelevel (solid sphere)   for point  (sqrt(3), 3, -2) and plot
3) Plot together 

Doing this calculation solely with contextpanel..no that's not always possible as it seems by trying to plot a sphere. 

How can this alteration occur by itself and what is the point of doing so? How do I change it back to $\cup$ and $\cap$?

I'm trying to put image in my maplet interface.

I use this following code

Label(Image(cat(currentdir(),"\\Image Folder\File name.png")))

The code work as well when i run the code in worksheet. But it doesn't work since i export the worksheet to .maplet file.

Please help. Thank you

interface(prettyprint=2):
with(ListTools):
with(StringTools):
for xx from 1 to 2 do
xx := 1:
Source := FileTools[Text][ReadFile](cat("C:\\hello\\probability1-200-26042020\\home\\probability",xx,"\\probability",xx,".txt")):
openindex := [SearchAll("[",Source)]:
endindex := [SearchAll("]",Source)]:
beforefiltered := []:
for mm from 1 to nops(openindex) do
if mm > 27 then
beforefiltered := [op(beforefiltered), Chop(substring(Source, openindex[mm]..endindex[mm]))]:
end if:
od:
afterfiltered := []:
for mm in beforefiltered do
if Has(mm,"--") or Has(mm,"|") or Has(mm,"{") or Has(mm,"}") then
dummy := 0:
elif Has(mm,"Root") then
dummy := 0:
else
afterfiltered := [op(afterfiltered),mm]:
end if:
od:
afterfiltered[1];

however after chop still has new line, can not make a beautiful csv format, 

"[b(t,k)+ a
(t,k)*
x(t,k)]"

# I try to export to text first and then use Excel to use "|" as delimiter instead comma as delimiter,
#because b(t,k) has comma "," will separate to open a new column

appendto("C:\\Users\\Student\\Documents\\IQ1-200csv.txt"):
for mm in afterfiltered do
AA := parse(mm):
lprint(xx,"|","hello := [","|",AA[1],"|",AA[2],"|","]:");
od:
od:

Expect csv in format
1,b(t,k)+a(t,k)*x(t,k)
2,a(t,k)+s(t,k)*z(t,k)

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

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

P1 := x^2+y^2-4:
P2 := y^2-2*x+2:

Original question is find CAD of (some y)[P1 <0 and P2 <0]

how to use maple 12 and maple 2015 to find Q1,Q2,Q3 which are projection of P1 and P2

my book show sample points are [-4,-1-sqrt(7),-3,-2,0,1,3/2,-1+sqrt(7),9/5,2,3]
but FindSamples result is not the same with my book, is it my book wrong or FindSamples function wrong?
I find result of my script is the same as book's quantifier position at 7,8,9 though sample points has little different

how to generalize my following script to multiple variables x, y, z, and more ?

and

I compare with maple 2015 result are different from my book solution, is maple 2015 more advanced version CAD? 

with(ListTools):

P1 := x^2+y^2-4:
P2 := y^2-2*x+2:

Q1 := x^2 + 2*x - 6;
Q2 := x^2 - 4;
Q3 := x - 1;

sourcesamples := sort(evalf([solve(Q1), solve(Q2), solve(Q3)]),`<`);

FindSamples:=proc(sourcesamples)
local N, P;
N:=nops(sourcesamples);
P:=proc(a,b)
local a1, b1, m1, n, m;
if a=b then error "Should be a<>b" fi;
a1,b1:=op(convert(sort([a,b],(x,y)->evalf(x)<evalf(y)),rational));
count := 0:
for n from 1 do
m1:=a1*n;
m:=`if`(type(m1,integer),m1+1,ceil(m1));
count := count + 1:
if is(m/n>a1) and is(m/n<b1) then return m/n fi;
od;
print("count=",count);
end proc:
[ceil(sourcesamples[1])-1, seq(op([sourcesamples[i],P(sourcesamples[i],sourcesamples[i+1])]), i=1..N-1),sourcesamples[N],floor(sourcesamples[N])+1];
end proc:

RemoveComplex := proc(yy)
local result, k:
result := []:
for k in yy do
if Im(k) = 0 then
result := [op(result), k]:
end if:
od:
if result = [] then
result := []:
end if:
return result:
end proc:

Joinsolution := proc(param1, param2group)
local result, k:
result := []:
for k in param2group do
result := [op(result), [param1, k]]:
od:
return result:
end proc:

CADsamples := FindSamples(sourcesamples):
CADresult1 := []:
for mm in CADsamples do
#print(mm):
if MakeUnique(RemoveComplex([solve(subs(x=mm, P1)), solve(subs(x=mm, P2))])) = [] then
CADresult1 := [op(CADresult1), op(Joinsolution(mm,[0]))];
else
CADresult1 := [op(CADresult1), op(Joinsolution(mm,FindSamples(sort(evalf(MakeUnique(RemoveComplex([solve(subs(x=mm, P1)), solve(subs(x=mm, P2))]))),`<`))))];
end if:
od:
CADresult1;

for mm in CADresult1 do
if subs(x=mm[1],subs(y=mm[2], P1)) < 0 and subs(x=mm[1],subs(y=mm[2], P2)) < 0 then
print("solution ", mm, SearchAll(mm[1],CADsamples), evalf(mm)):
end if:
od:

Compare with

with(RegularChains):
with(ChainTools):
with(MatrixTools):
with(ConstructibleSetTools):
with(ParametricSystemTools):
with(SemiAlgebraicSetTools):
with(FastArithmeticTools):
R := PolynomialRing([x,y]):
sys := [x^2+y^2-4,y^2-2*x+2]:
N := []:
P := []: 
H := [x]:
dec := RealTriangularize(sys,N,P,H,R):
proj := Projection(sys, N, P, H, 1, R);
Display(dec, R);

P := SamplePoints(sys, R);
Display(P, R);
cad := CylindricalAlgebraicDecompose(sys, R);
 

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