Maple 2021 Questions and Posts

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

restart:
eq := a*x^3 + b*x^2 + c*x + d;
 s := x1 + x2 + x3 = -b/a;
 sp := x1*x2 + x1*x3 + x2*x3 = c/a;
 p := x1*x2*x3 = -d/a;
sol:=solve({eq, p, s, sp}, {x1, x2, x3},explicit);                       
 a := 1;
b := -5;
c := 6;
d := -1;
 sol;                           

why is not successfull ?   Thank you.                 

I have a problem in plotting bellow function. actually because my main program is not working so I decided to do it in simple way. I found that my program in maple can't plot the function I introduced it as a procudure and is an implicit function. can you help me please?

>EQ := proc(x, t) local y, m, func;
                 m := 3;
                 func := m*x^2 + t*y^2 = 4;
          end proc;


>eq := EQ(x, 10);                              
                     eq := 3*x^2  + 10*y^2  = 4

>implicitplot(eq, x = -1 .. 1, y = 0 .. 2)
 Error, (in plots/implicitplot) invalid input: the following extra unknowns were found in the input expression: {y}
 

 

What is the [explict] relation between Maple's WeierstrassP and Weierstrass' P-function (e.g. https://en.wikipedia.org/wiki/Weierstrass_elliptic_function) ?

The worksheet here shows a couple of failed attempts at coaxing Maple to calculate the general solution of a pretty simple second order ODE.  I have also included the expected solution which I  have calculated by hand.  Perhaps I am missing a key trick.  Any ideas?

The ODE that I am actually interested in is significantly more complex. The one in the worksheet is a much simplified "bare bones" specimen that exhibits the issue that I am facing.

Attempt to solve with Heaviside

restart;

de := diff(u(x),x$2) = Heaviside(x - a)*u(x);

diff(diff(u(x), x), x) = Heaviside(x-a)*u(x)

dsolve fails:

dsolve(de);

u(x) = DESol({diff(diff(_Y(x), x), x)-Heaviside(x-a)*_Y(x)}, {_Y(x)})

Attempt to solve with piecewise

restart;

de := diff(u(x),x$2) = piecewise(x < a, 0, 1)*u(x);

de := diff(u(x), x, x) = piecewise(x < a, 0, 1)*u(x)

dsolve(de);

Error, (in dsolve) give the main variable as a second argument

dsolve(de, u(x));

Error, (in dsolve) give the main variable as a second argument

 

 

The solution is easy to calculate by hand

We just solve the (quite trivial) DE over the intervals x < a and x>a

separately, and patch the two solutions by requiring the continuity

of u(x) and diff(u(x), x) at x = a.  We get

sol := piecewise(x < a,
        x*c[1] + c[2],
        ((a*c[1] + c[1] + c[2])*exp(x))/(2*exp(a)) + ((a*c[1] - c[1] + c[2])*exp(-x))/(2*exp(-a)));

sol := piecewise(x < a, x*c[1]+c[2], (a*c[1]+c[1]+c[2])*exp(x)/(2*exp(a))+(a*c[1]-c[1]+c[2])*exp(-x)/(2*exp(-a)))

Download solving-an-ode.mw

restart;
with(plots);
with(plottools);
Vdot := proc (U, V)local i: add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc:
ngon := n -> local i; [seq([cos(2*Pi*i/n), sin(2*Pi*i/n)], i = 1 .. n)]:
theta := (2*Pi)/5;
poly := [seq([cos(k*theta), sin(k*theta)], k = 1 .. 5), datatype = float];
Ii := [0, 1/2]:
H := [-1/4, 0]:
r := dist(Ii, H):
theta := (2*Pi)/5:
p1 := pointplot([seq([cos(k*theta), sin(k*theta)], k = 0 .. 5)], symbol = solidcircle, color = red, symbolsize = 10):
p2 := textplot([seq([cos(k*theta), sin(k*theta), cat("M", k)], k = 0 .. 4)], align = ["above", "right"]):
cir1 := circle([0, 0], 1/2, color = green,dashdot:):
cir2 := circle([-1/4, 0], r, color = black):
cir3:=circle([0,0],1,color=red):
display([p1, p2, cir1, cir2, cir3,polygonplot(poly, thickness = 5, color = blue, transparency = 0.95)], axes = normal);
Why this error , Thank you.

 y = ax^3 + bx^2 + cx + d this is curve and is passing through the points (−1,−4),(1,0),(2,0),(3,−4).
1) Find the values of 𝑎,𝑏,𝑐 and 𝑑.
2) Plot the curve and the points given on the same axis.

I tried solving with derivative of the curve but i didnt find the exact values.

Why this error message ?
with(geometry);
vartheta := (2*Pi)/17;
x || k := cos(k*theta);
y || k := sin(k*theta);
 xk := cos(k theta): yk := sin(k theta)
.M||k:=(point,x||k,y||k);
 with(plots):
Points := pointplot([seq(M || k, k = 1 .. 16)], symbol = solidcircle, color = red, symbolsize = 10):
Error, (in plots:-pointplot) cannot convert data to an Array of datatype float[8]; Thank you for your answer..

Hello, I have a question.

The exercise consists of defining the image in relation to a chosen base. For example, I choose {x^4,x^3*y,x^2*y^2,x*y^3,y^4} as a base. Then I want to calculate T(x^4), T(x^3*y),T(x^2*y^2),T(x*y^3),T(y^4) through maple but but maple won't calculate it.

Do you know what I'm doing wrong?
Thanks in advance

 

Hi MaplePrimes. 

I have a cubic with some parameters that I would like to solve and recieve 3 real solutions, however I cannot seem to find a way to get that to work while using assumptions. I always recieve 1 real and two complex conjugate answers. I have tried assuming the discrimant to be greater then zero but nothing seems to be working, and I have looked through a few posts on here but I cant seem to find anything out. In particular solve({f,conditions},{variable}) 

If I solve with a known set of paramters(which i determine graphically) that gives three solutions everything works fine. Also if I solve the cubic generally and recieve the two complex solutions and one real then substitute the paramters in I get the same correct answers, so I am slightly baffled. If I have missed something simple my apologies. 

Any help would be greatly appreciated. File attached. 

CubicSolve.mw

This is the default style about the group of DrawSubgroupLattice:

DrawSubgroupLattice(SymmetricGroup(4))

But I hope to label the DrawSubgroupLattice with the order of the subgroup but not the default index, is it possible? I can get the order with this code:

GroupOrder~(SubgroupLattice(SymmetricGroup(4), output = list))

But I don't know how to label it into the node...

How to plot F(R) for R=0..100 ?

Maple 2021 sheet attached.

restart; i := I``

with(LinearAlgebra)

E := 100

100

(1)

"Z(R):=((5+5 i)*(R-10 i))/((5+5 i)+(R-10 i))"

proc (R) options operator, arrow, function_assign; (5+5*i)*(R-10*i)/(5-5*i+R) end proc

(2)

"`I__R`(R):=E/(Z(R))"

proc (R) options operator, arrow, function_assign; E/Z(R) end proc

(3)

"F(R):=|`I__R`(R)|"

proc (R) options operator, arrow, function_assign; abs(I__R(R)) end proc

(4)

"plot(F(R),R=0..100)->"

 

NULL

Download How_to_plot_IR.mw

plot(F(R), R = 0 .. 100)

I don't know how to use the group produced with DirectProduct. such as

G := DirectProduct(QuaternionGroup(), CyclicGroup(3)):
DrawSubgroupLattice(G)

Or

IsNormal(CyclicGroup(2), DirectProduct(CyclicGroup(2), CyclicGroup(2)))

They all will get error information. It looks like the format is different, do I need to convert it somehow? Or is this a bug in maple?

Hello,

Im a tax student and tring to figure out Maple. I plotted the following graph with the code:

implicitplot([Vth = Vps, V1 = 25000, V1 = 50000, V1 = 75000, V1 = 100000], E = 0 .. 1000000, T = 0 .. 15, color = [black], labels = ["E in (EUR)", "T (in Jahren)"], labelfont = [times, bold, 12], view = [0 .. 1000000, 0 .. 15])

I would like to color the intermediate areas and attach a legend. A colleague has plotted this for me, but unfortunately has not provided me with the source code and has now lost the file. Can someone help me to re-plot the last shown chart?

Thanks so so much in advance!! Best regards Rebekka

Hello,

Im a tax student trying to use Maple for my studies. I plotted two surfaces in a 3D coordinate system, the surfaces intersect = indifference area.

The current formula is like this:

plot3d([Vth/E, Vps/E], E = 0 .. 1000000, T = 0 .. 15, labels = ["E", "T", ""], color = [gray, white], labels = ["E (in EUR)", "T (in Jahren)", ""], labelfont = [times, bold, 12])
It looks like this: