Maple 2018 Questions and Posts

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

Hi,

I have two coupled algebraic equations (not differential equations; but only simple algebraic equations; call them "equ1" and "equ2") in which there are three parameters: "x", "y", and "z".

I want to use "fsolve" (Numerical solve) for solving them and then plotting. But since there are three parameters and two equations hence one of the parameters must be given. I want to give a range for "z", for example [2..9], and step size, for example "0.5", such that maple first puts "2" in both equations and solve them numerically and get the values of "x" and "y" and then record them, and then set the value "2.5" for "z" and again repeat the above cycle until the value "z=9". Finally plot both "x" and "y" in terms of "z".

How do I write this?

Thanks in advance

Hi everyone

I wonder if the following elliptic PDEs system can be caculated by Maple 2018.

The PDEs system is

where

Maple sketched solutions of the above system, but unfortunately main portions (sine portion) of all the solutions seemed to overlap together.

Is it possible to output all the solutions filling the target region (or at least not overlapping) by revising the code?

I am not the sure if the overlap is caused by the boundary conditions(BC) or caused by the elliptic PDEs system??

Particularly, I do not understand how (D[2](x))(xi, 0) = 0 and (D[2](y))(xi, 0) = 0  work in the BCs. Is there any paper or textbook explaining this setup??

Thanks in advance.

The code is as follows (or the code can be downloaded from attatched mw QUESTION_20210423_001.mw):

restart;
with(plots);


alpha04 := (diff(x(xi, eta), eta))^2+(diff(y(xi, eta), eta))^2;

beta04 := (diff(x(xi, eta), xi))*(diff(x(xi, eta), eta))+(diff(y(xi, eta), xi))*(diff(y(xi, eta), eta));

gamma04 := (diff(x(xi, eta), xi))^2+(diff(y(xi, eta), xi))^2;

PDE04 := {alpha04*(diff(x(xi, eta), xi, xi))-2*beta04*(diff(x(xi, eta), xi, eta))+gamma04*(diff(x(xi, eta), eta, eta)) = 0, alpha04*(diff(y(xi, eta), xi, xi))-2*beta04*(diff(y(xi, eta), xi, eta))+gamma04*(diff(y(xi, eta), eta, eta)) = 0};


IBC04 := {x(0, eta) = eta, x(1, eta) = eta, x(xi, 0) = sin((2.0*Pi)*xi), y(0, eta) = eta, y(1, eta) = eta, y(xi, 0) = 100*xi, (D[2](x))(xi, 0) = 0, (D[2](y))(xi, 0) = 0};

pds04 := pdsolve(PDE04, IBC04, numeric, spacestep = 1/50);


xCurve04 := plots[display]([seq(pds04:-plot(x, eta = i), i = 0 .. 10)]);

yCurve04 := plots[display]([seq(pds04:-plot(y, eta = (1/10)*i), i = 0 .. 10)]);

 

We give a line (D) and a point A located at a distance AH=h from D. A constant angle of magnitude alpha pivots to its apex A and we call B and C the points where its sides cut the line D. Let O be the center of the circle circumscribed to the triangle ABC.
Demonstrate that the B and C tangents to the O circle keep a fixed direction. 
Here is my code which don't work for slopes are not equal.

restart; with(plots): with(geometry):unprotect(D):
_EnvHorizontalName := 'x':_EnvVerticalName := 'y':
line(D, y = (1/2)*x-1); point(A, 5, 5); PerpendicularLine(lp, A, D); h := distance(A, D); intersection(H, D, lp);
alpha := (1/16)*Pi;
rotation(lp1, lp, (1/6)*Pi, 'clockwise', A); rotation(lp2, lp1, (1/6)*Pi-alpha, 'clockwise', A); FindAngle(lp1, lp2); evalf(%);
intersection(B, D, lp1); intersection(C, D, lp2);
triangle(T, [A, B, C]);
circumcircle(Elc, T, 'centername' = OO);
TangentLine(tgB, B, Elc); TangentLine(tgC, C, Elc);
evalf(slope(tgB)); evalf(slope(tgC));
dr := draw([D(color = blue), lp(color = red), Elc(color = green), A, B, C, T(color = black), H, tgB, tgC], printtext = true);

display([dr], axes = none, scaling = constrained);
Fig := proc (k) local dr, Elc, B, C, lp1, lp2; global D, A, lp, H, alpha; geometry:-rotation(lp1, lp, (1/6)*Pi+k, 'clockwise', A); geometry:-rotation(lp2, lp1, (1/6)*Pi-alpha+k, 'clockwise', A); geometry:-intersection(B, D, lp1); geometry:-intersection(C, D, lp2); geometry:-triangle(T, [A, B, C]); geometry:-circumcircle(Elc, T, 'centername' = OO); geometry:-TangentLine(tgB, B, Elc); geometry:-TangentLine(tgC, C, Elc); dr := geometry:-draw([D(color = blue), lp(color = red), Elc(color = green), A, B, C, T(color = black), H, tgB, tgC], printtext = true); plots:-display([dr], axes = none, scaling = constrained) end proc;
iframes := 10;

display([seq(Fig((1/12)*Pi+i/(10*iframes)), i = 1 .. iframes)], insequence, scaling = constrained);
How to improve this code ? Thank you.

I have a complicated expression which involves RootOf. How to get rid of and simpliy the equation?

I am looking for an expression for eta(H) not a numerical value.  

eta(H)sheet1.mw  

Hello,

I am working on a project to code a conjecture in Maple and I am stuck.  It is as follows:

"Someone had a conjecture that any odd number greater than one can be written as the sum of a prime number and twice a perfect square.  (ie 3=3+2*02, 15 = 7+2*22)  I would like to know if this holds for all the numbers from 3 to 9,000 and if not, which odd numbers fail this criteria."

I have very little coding experience so I am looking to see if anyone has an idea where I can go with this.  I tried the following:

X=P+2*N where

X:=seq(3+2i, i=0..4499);

P:={seq(ithprime(i), i=1..1250)};

N:=seq(i^2, i=0..100);

Once I get this far, however, I don't know where to go.  I would like the left side of the equation to run from 0 through 4499 (giving me a value of over 9000) while the right side does the same thing.  If there are any situations where the left side and right side do not equal each other, I want it to tell me.

My apologies if this is too wordy or confusing.  Thank you.

I  am trying to find the integer numbers a, b, c, d, m so that the equation

(x−a)(x−b)(x−c)(x−d)=m

where a+d=b+c  and m≠0 has four integer solutions.

I found this equation randomly
solve((x-5) (x-3) (x+6) (x+8)=504, x);
How to find number a, b, c, d, m so that the equation
(x−a)(x−b)(x−c)(x−d)=m
has four integer solutions?

I am still a novice of Maple, but I want to carry out recurvive applications of some formula that involves non-commutative operators X and Y ([X,Y] = XY-YX). I used the following code, but I do not know how to tell Maple a rule that [X,X] = [Y,Y] = 0:

with(Physics);
Setup(mathematicalnotation = true);
Setup(noncommutativeprefix = {X, Y});

Z := X + Y + (1/2)*Commutator(X,Y);
subs(X=Y,Z);

The output is like this:

> Z := X + Y + (1/2)*Commutator(X,Y);
                          Z := X + Y + 1/2 [X, Y][-]

> subs(X=Y,Z);
                              2 Y + 1/2 [Y, Y][-]

The above [Y,Y] must be interpreted as zero, of course.

Thank you very much.

Hello,

How I can Plot this structure using define new coordinate such as cylinderical om\ne or addcoords?

plot.mw

test1_03.mw

The solution I'm getting here for v(y), doesn't satisfy my original two equations. Like for example if I choose u(y)=y, for easy check it can be seen that my de2 equation doesn't satisfy that value.

Can anyone help me out?

I see this question at here
https://mathematica.stackexchange.com/questions/239874/how-to-reduce-timing-to-find-the-integer-numbers-a-b-c-d-e-f-g-h-k-m-of

How to solve this problem by Maple?

I want to remove the term XY
f:=(x,y)->2*x²+xy+y²+4x-y-2=0;
eq := simplify(subs(x = X-9/7, y = Y+8/7, f(x, y)));
theta:=Pi/8;
ex := simplify(subs(X = cos(theta)*X-sin(theta)*Y, Y = sin(theta)*X+cos(theta)*Y, eq)); evalf(%);
How to obtain (3+sqrt(2))/2*X²+(3-sqrt(2))/2=36 ? Thank you.

 

I am trying to solve this equation, I tried
 

restart; 
ListTools[Categorize]; 
L := []; 
for a to 20 do
 for b to 20 do 
for c to 20 do 
for d to 20 do 
for e to 20 do 
for f to 20 do 
for g to 20 do 
for h to 20 do 
if sqrt(a+b*sqrt(c+d*sqrt(e +f*sqrt(g)))) = h then L := [op(L), [a, b, c, d, e, f, g, h]] end if
 end do end do end do end do end do end do end do end do; nops(L)

where g is not a square of a integer number . I do not get any solutions for a long time. How to reduce timing to solve this equation?

 

This question came to me when I answered in this thread  https://www.mapleprimes.com/questions/231603-Solve-Onevariable-Equation

The equation there is quite cumbersome, I extracted a shorter subexpression from it (I converted all floats to exact constants), but the  solve  command hangs when trying to solve it. fsolve  handles the equation easily. We can see that the equation  Eq  is quite simple and easy to solve even by hand. I ask this question in a separate topic, because this seems to be a serious bug in the  solve  command.

restart;
Eq:=1-1/(1+203808*exp(-342569/506*t)*(1/131537))^(131537/203808)=44983/56599;
solve(Eq);

                    

 

Edit. I noticed that the  isolate  command solves the problem, but of course the question remains open with  solve .

How to plot absolute value in dsolve?
absolute_plot.mw

Plotting in the first coordinate in the plane......

I know that, tetrahedron with vertices (0, 0, 0), (3, 0, 0), (0, 5, 0), (0, 0, 14) has center of insphere is  (1, 1, 1) and radius R = 1. How to create a tetrahedron whose coordinates of all vertices are integers, the inscribed spherical center and the inscribed spherical radius are integers?

First 8 9 10 11 12 13 14 Last Page 10 of 62