Carl Love

Carl Love

26518 Reputation

25 Badges

11 years, 197 days
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity

These are answers submitted by Carl Love

theta:= (n::{odd,posint})-> 
          2*sin((n+1)*beta/2)/(n+1)/beta +
          `if`(n=1, 1,

@jenniferchloe In order to end up with a closed curve, it needs to be a closed curve (a polygon) at the initial level. And you can't do that with just any angle. To make an initial equilateral triangle, you need to make turns of 120 degrees. If the angle is set at 60, each of those turns is RR. So, to do the spiky 80-degree thing all the way around,

  1. set the angle to 40
  2. make the initial triangle with RRR turns (3*40 = 120)
  3. replace every single turn in the recursion with a double turn (2*40 = 80).


The equation can be entered like this:

w(x,y) = 4*F/Pi^4/E[2]/I/a/b*


   n= 1..infinity), m= 1..infinity


"Solving" it is another thing. It's not exactly clear what "solve" means in this case.


Try this:

plot(sin(x), labels=[typeset(convert(a, `local`)[0]), "some text"]);

To address your first issue: Maple's int does not supply a constant of integration. If you need one, you can add it yourself, or you can use dsolve without initial conditions:

eq:= diff(v(x), x, x) = P*x/E/Iz;
                      d  / d      \   P x
                     --- |--- v(x)| = ----
                      dx \ dx     /   E Iz
                          P x                
                  v(x) = ------ + _C1 x + _C2
                         6 E Iz              

I noticed that you changed the initial condition on the derivative between your solution with int and your attempted solution with dsolve. You should specify the condition like this: D(v)(0) = -P*L^2/E/Iz/2. (If you need to specify a condition for a second derivative, then use (D@@2)(v)(0).) Putting it all together, we have

bcs:= v(L)=0, D(v)(0) = -P*L^2/E/Iz/2;
                                         P L  
                  v(L) = 0, D(v)(0) = - ------
                                        2 E Iz
dsolve({eq, bcs});
                           3       2         3
                        P x     P L  x    P L  
                v(x) = ------ - ------ + ------
                       6 E Iz   2 E Iz   3 E Iz



To answer your original question, the initial triangle is different. It does not have any left turns. The "turtle" (i.e. cursor or pen in adult language) seems to start in the upper left with an initial heading (direction) horizontally to the right. So, the basic triangle (a downward pointing equilateral triangle) can be plotted via



Each edge of the triangle in represented by an F (Forward). We want to subdivide each edge. So we replace each F with the Koch recursion. We can do it like this

Snowflake:= n-> cat(Koch(n), "RR", Koch(n), "RR", Koch(n));

where Koch is the procedure from your original post, not the one from your Reply.

Finally, to plot it you can do


Use the ImportData() command to launch a dialog/assistant that will read your data file into a Matrix. Then follow the instructions given by Preben.

Having only one equation, you can only solve for one variable per invocation of solve:

solve(equation1, {p[1]});

solve(equation1, {p[2]});

Also, looking closely at the end of your equation, I see that it is fourth order in p[2]. This may have been a typo on your part, since you said the equation was quadratic. It is still solvable, but the solutions are very large, and take about a minute to be generated.

It is unfortunate that solve does not simply give an error message when one asks for solutions for more variables than there are equations. Instead one gets the confusing "Warning: Solutions may have been lost".

     if given a permutation group

     1 2 3

     2 1 3

To me, that's a single permutation, not a whole permutation group. But perhaps you mean the group generated by the permutation.

The cycle factorization of the permutation can be done via

convert([2,1,3], disjcyc);
                            [[1, 2]]

But I don't know if that satisfies your questions about the "type" of permutation group and about polya counting. Let me know.

I think that what you want is

plots:-spacecurve([seq]([x[k],y[k],z[k]], k= 1..200));

But I don't know if that's "in the three-dimensional phase domain", and it's certainly not a "phase plane".

Anyway, please let me know if the spacecurve is what you want.

You need to make some assumptions for the IsDefinite to work.

assume(w1 >= 0, w2 >= 0, w3 >= 0, w4 >= 0, w5 >= 0, w6 >= 0);

I don't know if the overall program will work after these assumptions are made (you didn't attach the uploaded file), but that's the first hurdle.

Note that L(w1,w2,w3,w4,w5,w6,lam) is evaluated before being passed to NLPSolve. Thus, the fact that you did specify the nonnegativity assumptions in the call to NLPSolve does not cause those assumptions to be used while evaluating the arguments to NLPSolve.

This is a bit tricky; perhaps not suitable for the Maple beginner.

F:= (N::evaln(list(`=`)))-> (convert(N, `local`)@lhs = rhs) ~ (eval(N)):

u:= [a=x, b=w]:
p:= [1=4, 3=2, 5=2]:
F(u), F(p);
      [u(a) = 1, u(b) = w], [p(1) = 4, p(3) = 2, p(5) = 2]

seq(Matrix([[seq(a[k], k = x+m .. y+m)]]), m = 0 .. 2);


Obviously, the result of such a command is a sequence of Matrices, not a Matrix.

Here's my shortest code:

< seq(< a[x+m..y+m] >^%T, m= 0..2 ) >;

In particular, note the for any list L and valid indices a and b,

[seq(L[k], k= a..b)]

is the same thing as simply


In Maple, when a negative real number is raised to a fractional power with an odd denominator, the result is not real. As it says at ?arithop or ?^,

For non-integer (complex) numeric powers y and (complex) numeric x, the expression x^y is evaluated as exp(y*ln(x)), where ln(x) is evaluated using the principal branch of the logarithm.

The function surd can be used to compute real odd roots of negative real numbers.  See ?surd for more information.

Since ln(-1) = I*Pi, the upshot of that first sentence is that for integer n, (-1)^(1/n) = cos(Pi/n) + I*sin(Pi/n):

                         1   1    (1/2)
                         - + - I 3     
                         2   2      

                         1   1    (1/2)
                         - + - I 3     
                         2   2         

surd(-1, 3);


use RealDomain in (-1)^(1/3) end use;

(see ?RealDomain).

In this case, you need to circumvent the automatic simplification of x^0 to 1. You do this with

coeff(b, x, 0).

First 360 361 362 363 364 365 366 Last Page 362 of 383