MaplePrimes Questions

plot-problem.mw

I have done something but what?

I want to use maple notation for input and  output.

I have done something to mess this up.

How do I get rid of the typesetting messages?

L:=[["O",3.85090000,0.45160000,0.00120000],
["O",−2.59990000,1.40410000,−0.00180000],
["N",−1.57050000,−0.71710000,0.00010000],
["C",−0.20660000,−0.42310000,−0.00020000],
["C",0.22050000,0.90470000,0.00040000],
["C",0.72980000,−1.45700000,−0.00070000],
["C",1.58410000,1.19860000,0.00020000],
["C",2.09330000,−1.16290000,−0.00070000],
["C",2.52040000,0.16480000,−0.00030000],
["C",−2.64850000,0.17820000,0.00090000],
["C",−3.97350000,−0.54200000,0.00100000],
["H",−0.44360000,1.75770000,0.00120000],
["H",0.41130000,−2.49630000,−0.00100000],
["H",−1.80100000,−1.70860000,0.00010000],
["H",1.90530000,2.23700000,0.00090000],
["H",2.81800000,−1.97260000,−0.00080000],
["H",−4.06550000,−1.14630000,−0.90580000],
["H",−4.79040000,0.18440000,0.02880000],
["H",−4.04450000,−1.18860000,0.88020000],
["H",3.96500000,1.41760000,0.00170000]];

S:={{1,9},{1,20},{2,10},{3,4},{3,10},{3,14},{4,5},{4,6},
{5,7},{5,12},{6,8},{6,13},{7,9},{7,15},{8,9},{8,16},{10,11},
{11,17},{11,18},{11,19}}

Now I have list L above a Set S below 

Now we delete from L all having "H" in first position and also  the subsets of the set S which as all contain those  list position number where L had "H"

Kind help with function which can

Takes input of the list and sets returns the new list and set where the above are done 

First of all I would like to wish all of you a happy, prosperous but especially healthy 2023! I have again a beginner question. Why is test2 not working in the attached document?

Thank you so much for your assistance!

QuestionFDS.mw

I remember a section “Tell us what we can do better” at the bottom of online help pages. I used this whenever I came across a potential error worth investigating.

Has this section disappeared (I hope not) or do I have a browser issue?

restart;
with(geometry);
with(plots);
_EnvHorizontalName = 'x';
_EnvVerticalName = 'y';
Vdot := proc(U, V) local i; add(U[i]*V[i], i = 1 .. 2); end proc;
dist := proc(M, N) sqrt(Vdot(M - N, M - N)); end proc;
EQ := proc(M, N) local eq, a, b, c; eq := simplify(expand((y - M[2])/(x - M[1]) - (N[2] - M[2])/(N[1] - M[1]))*(x - P1[1])*(P2[1] - P1[1])); a := coeff(eq, x); b := coeff(eq, y); c := tcoeff(eq, [x, y]); RETURN(-a*x/c - b*y/c - 1); end proc;
R := 5;
ang := [2/3*Pi, -3*Pi*1/4, -Pi*1/6];
seq(point(`||`(P, i), [R*cos(ang[i]), R*sin(ang[i])]), i = 1 .. 3);
seq(dsegment(`||`(seg, i), [`||`(P, i), `||`(P, irem(i, 3) + 1)]), i = 1 .. 3);
circle(cir, [point(OO, [0, 0]), R]);
sol := solve(subs(x = 2, Equation(cir, [x, y])), y);
point(A, [2, sol[1]]);
triangle(Tri, [P1, P2, P3]);
incircle(inc, Tri, 'centername' = oo);
circle(Cr, [A, oo]);
sol := solve({Equation(Cr, [x, y]), Equation(inc, [x, y])}, {x, y});
point(H1, [subs(sol, x), subs(sol, y)]);
line(L, [A, oo]);
reflection(H2, H1, L);
line(L1, [A, H1]);
line(L2, [A, H2]);
Equation(cir, [x, y]);
Equation(L1, [x, y]);
sol := solve({Equation(L1, [x, y]), Equation(cir, [x, y])}, {x, y});
evalf(%);
point(M1, [subs(sol, x), subs(sol, y)]);
sol2 := solve({Equation(L2, [x, y]), Equation(cir, [x, y])}, {x, y});
evalf(%);
point(M2, [subs(sol2, x), subs(sol2, y)]);
triangle(TR, [M1, M2, A]);
display([draw([P1(symbol = solidcircle, symbolsize = 8, color = blue), P2(symbol = solidcircle, symbolsize = 8, color = blue), P3(symbol = solidcircle, symbolsize = 8, color = blue), A(symbol = solidcircle, symbolsize = 8, color = black), H1(symbol = solidcircle, symbolsize = 8, color = black), H2(symbol = solidcircle, symbolsize = 8, color = black), L1(color = black), L2(color = black), seg1(color = magenta), seg2(color = magenta), seg3(color = magenta), Cr(color = black), cir(color = magenta), inc(color = blue)]), textplot([seq([coordinates(`||`(P, i))[], convert(`||`(P, i), string)], i = 1 .. 3)], 'align' = {'above', 'left'})], view = [-6 .. 10, -15 .. 6], scaling = constrained, size = [800, 800], axes = none);
It seems that there is conusion between M1 and M2. How to write letters A, M1 ,M2, H1, H2 ? Thank you.

The range is wrong. For details, see below, please.
 

restart;

assume(x, RealRange(0, 1))

plot([sqrt(x*(2 - x)/3), 1 - sqrt((1 - x^2)/3)], legend = InertForm:-Display~([sqrt(x*(2 - x) %/ 3), 1 - sqrt((1 %- x^2) %/ 3)], 'inert' = false));

 

smartplot([sqrt(x*(2 - x)/3), 1 - sqrt((1 - x^2)/3)]);

 

smartplot([''piecewise'(And(0 <= x, x <= 1), sqrt(x*(2 - x)/3))', ''piecewise'(And(0 <= x, x <= 1), 1 - sqrt((1 - x^2)/3))']);

 

smartplot(['piecewise(And(0 <= x, x <= 1), sqrt(x*(2 - x)/3))', 'piecewise(And(0 <= x, x <= 1), 1 - sqrt((1 - x^2)/3))']);

 

smartplot([''piecewise''(And(0 <= x, x <= 1), sqrt(x*(2 - x)/3)), ''piecewise''(And(0 <= x, x <= 1), 1 - sqrt((1 - x^2)/3))]);

 

x := 'x'NULL


 

Download SmartPlots.mw

The help page claims that smartplot(..) will call 2-D plot procedures ultimately, but why is the smartplots command incompatible with the use of assume?

Good day everyone,

I have been having problems with a system of PDE solution using `numeric`.

It's giving me the error code "Error, (in pdsolve/numeric/par_hyp) input system is too far from a 'standard' form (see ?pdsolve,numeric for more detail)" and I have checked to the best of my ability for the error but could not see anything.

The code is attached below.

Please, anyone with useful information should help. Thanks

Numeric.mw

How do I find the solutions "left" and "right" with only answers in the range 0 to +1?

The domain of eq1 and eq2 is 0 <=beta <= 1.

So I'm only interested in left[1] and right[2]:

Here is the code:

eq[1]:=(1/6)*beta^3+(1/2)*xi^2*beta-(1/2)*beta^2-(1/2)*xi^2+(1/3)*beta = 0;

eq[2]:=(1/6)*beta*(beta^2+3*xi^2-6*xi+2) = 0;

left:=solve(eq[1],xi);

right:=solve(eq[2],xi);

left:=plot(left[1],beta=0..1,thickness=2,color=blue);

right:=plot(right[2],beta=0..1,thickness=2,color=blue);

How do I plot a volume of revolution? I can plot other volumes using Student[Calculus1]]:-VolumeOfRevolution, but not this one. I get a blank plot. I do get the correct volume from output=value..

How do I plot this using plot3d?

restart;
a := 0; b := 1;
f := (x) -> x^2+2;
g := (x) -> 1/2*x+1;
V := int(f(x)^2 - g(x)^2,x=a..b)*Pi;
Student[Calculus1]:-VolumeOfRevolution(f(x),g(x),x=a..b,output=value);
Student[Calculus1]:-VolumeOfRevolution(f(x),g(x),x=a..b,output=plot);
 

I was having this problem with Maple Flow 2021, and just purchased Maple Flow 2022 but am still having this problem.

I define a variable, using := and an equation (that itself uses other variables that have been assigned a numeric value) and end it with an = and it is clear that the variable has a numeric value successfully assigned to it.

Lower down in the document, I use this variable, but it isn't recognized as having any numeric value or having been previously definied at all and when evaluated it stays in symbolic form.

I have tried deleting variables, renaming them without subscripts, retyping equations, etc. and nothing seems to work. Oddly most of the variables work, but some won't even though there doesn't seem to be anything special about them.

Any thoughts or advice would be greatly appreciated.

I cannot plot the **erf** function, please see below, what's wrong ?

 

Suppose I have a matrix representing a magma such as

matrix(n,n, (i,j)->E[i].E[j])

First, if E is a set of integers then . is converged to * for some reason.

Second, is there any way to simplify the presentation of this matrix? I am using subs to simply but I have to essentially hand code every entry which sort of defeats the purpose. Is there any way to present a matrix and then have the resultant simplified as far as possible?

E.g., subs does not allow one to do something like ?.E[3] = E[2] where ? represents any value. E.g., if I have an identity it would be nice to simplify all elements quickly with one expression rather than having one for all possibilities(essentially 2n).

Also, magma's only let positive integers which seems kinda restrictive(why not create map internally to handle it?).

Also, is there any way to use special chars like -? I'm using d but I'd prefer using special chars so it is visually more congruent to what I'm doing. I realize - is also a minus but maybe there is someway around it(unicode?)?

Hello everybody! Happy new year!

Allright, well, the question states the following: "What is the maximum product of the fromula x*y*z which has the sum of 6 if you add x, y, and z together".

Now, i am seeing what they are doing, but somewhere down the line in the explaination they say "(after some calculations)". 

Isnt there a faster way to do it? And what did they do in the example to get to the result?

Thank you very much!

Greetings,

The Function    

solve(x+y+z = 6, z)

6-x-y

(1)

x*y*(6-x-y)

x*y*(6-x-y)

(2)

expand(x*y*(6-x-y))

-x^2*y-x*y^2+6*x*y

(3)

diff(-x^2*y-x*y^2+6*x*y, x)

-2*x*y-y^2+6*y

(4)

convert(-2*x*y-y^2+6*y, 'horner', y)

(-2*x+6-y)*y

(5)

solve(-2*x*y-y^2+6*y = 0, y)

0, -2*x+6

(6)

y := 0; solve(-2*y+6 = x, x)

0

 

6

(7)

restart

diff(-x^2*y-x*y^2+6*x*y, y)

-x^2-2*x*y+6*x

(8)

convert(-x^2-2*x*y+6*x, 'horner', x)

(-2*y+6-x)*x

(9)

solve(-x^2-2*x*y+6*x, x)

0, -2*y+6

(10)

x := 0; solve(-2*x+6 = y, y)

0

 

6

(11)

``

Download Mapleprimes_Question_Book_2_Paragraph_5.11_Example_35.mw

I have just installed the Google Maps package but when I run the commands I only get empty results and some errors

Any thoughts of what can be wrong. Have latest Montery OSX 

/Anders

I have a system of first order ODEs to solve using ODEplot. Now, need to plot one of the dependent variables by varying the initial condition. How do I go about this?

First 240 241 242 243 244 245 246 Last Page 242 of 2425