Carl Love

Carl Love

28015 Reputation

25 Badges

12 years, 297 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@PlpPlp Upload the long expression.

@PlpPlp Upload the long expression.

@Markiyan Hirnyk You're right, I was using the wrong version of Maple. I just sent you an email with more info.

@Markiyan Hirnyk You're right, I was using the wrong version of Maple. I just sent you an email with more info.

@Markiyan Hirnyk By doing a simulation in Maple, I know that my answer is wrong and that Joe's edit of his original answer is correct. But I either don't understand or don't agree with Joe's analysis of what was wrong with my answer. My simulation showed that my count of the |AB|=4 case was short by a factor of 2, and my counts of both subcases of the |AB|=3 case were short by a factor of 4. Here's the simulation code:

S:= combinat[powerset](5):
n:= 0: ab3:= 0: ab4:= 0: ab5:= 0: b4:= 0:
for A in S do  for B in S do  for C in S do
    if nops(A union B) = 5 and nops(A intersect B intersect C) = 3 then
        n:= n+1;
        abn:= nops(A intersect B);
        if abn=3 then
            ab3:= ab3+1;
            if nops(B)=4 then b4:= b4+1 end if
        elif abn=4 then ab4:= ab4+1
        end if
    end if
end do  end do  end do:
n, ab3, ab4, b4;

So, the final answer is 250*binomial(30,5)*2^25, which is the same as what Joe got, although he expressed it differently.

@Markiyan Hirnyk By doing a simulation in Maple, I know that my answer is wrong and that Joe's edit of his original answer is correct. But I either don't understand or don't agree with Joe's analysis of what was wrong with my answer. My simulation showed that my count of the |AB|=4 case was short by a factor of 2, and my counts of both subcases of the |AB|=3 case were short by a factor of 4. Here's the simulation code:

S:= combinat[powerset](5):
n:= 0: ab3:= 0: ab4:= 0: ab5:= 0: b4:= 0:
for A in S do  for B in S do  for C in S do
    if nops(A union B) = 5 and nops(A intersect B intersect C) = 3 then
        n:= n+1;
        abn:= nops(A intersect B);
        if abn=3 then
            ab3:= ab3+1;
            if nops(B)=4 then b4:= b4+1 end if
        elif abn=4 then ab4:= ab4+1
        end if
    end if
end do  end do  end do:
n, ab3, ab4, b4;

So, the final answer is 250*binomial(30,5)*2^25, which is the same as what Joe got, although he expressed it differently.

The best way to enter multi-line code into a Maple worksheet is to use a Code Edit Region. Place your cursor where you want the window, then select Code Edit Region from the Insert menu. It gives you a Notepad-like editor with tabs and hanging indents. Also, you can use ordinary Enter (or Return) instead of Shift-Enter (Shift-Return).

Please upload your worksheet, not just a screen shot of it, so that we can work with it. Use the green up arrow that is the last thing on the tool bar of the MaplePrimes editor. And please upload a photo of a hand-drawn sketch of what you think the plot should look like. My first impression is that we can use the RootOf comand with the selector option.

I doubt that it could be expressed in radical form without the I, because it comes from solving a cubic. Attempting to use evalc and simplify puts it back into a trigonometric form.

"... if the number of degrees is divisible by three" seems like a rather weak statement! Here I prove that the trigonometric functions for any integer number of degrees can be expressed in radicals. Below, I derive cos(20°) in radicals (because the expression is relatively simple) and cos(1°). Clearly, once you have cos(1°) in radicals you can get any trigonometric function of any integer number of degrees in radicals by applying secondary-school-level identities.

I also used my font chart from my previous post to find that the degree symbol is character number 176, so I use that below.

It is surprising that convert(..., radical) does not apply these techniques. It seems limited to multiple-of-three degrees.

restart;

°:= Pi/180:

cos(3*`20°`) = cos(60*°);

cos(3*`20°`) = 1/2

expand(%);

4*cos(`20°`)^3-3*cos(`20°`) = 1/2

solve({%, cos(`20°`) > 0}, cos(`20°`), Explicit);

{cos(`20°`) = (1/4)*(4+(4*I)*3^(1/2))^(1/3)+1/(4+(4*I)*3^(1/2))^(1/3)}

expand(cos(3*`1°`)) = convert(cos(3*°), radical);

4*cos(`1°`)^3-3*cos(`1°`) = (-(1/16)*2^(1/2)+(1/8)*(5+5^(1/2))^(1/2)+(1/16)*2^(1/2)*5^(1/2))*3^(1/2)+(1/8)*(5+5^(1/2))^(1/2)+(1/16)*2^(1/2)-(1/16)*2^(1/2)*5^(1/2)

solve({%, cos(`1°`) > 0}, cos(`1°`), Explicit);

{cos(`1°`) = (1/8)*(4*3^(1/2)*2^(1/2)*5^(1/2)-4*2^(1/2)*5^(1/2)-4*2^(1/2)*3^(1/2)+8*3^(1/2)*(5+5^(1/2))^(1/2)+4*2^(1/2)+8*(5+5^(1/2))^(1/2)+(8*I)*(32-2*5^(1/2)*2^(1/2)*(5+5^(1/2))^(1/2)-4*5^(1/2)*3^(1/2)+2*2^(1/2)*(5+5^(1/2))^(1/2)-4*3^(1/2))^(1/2))^(1/3)+2/(4*3^(1/2)*2^(1/2)*5^(1/2)-4*2^(1/2)*5^(1/2)-4*2^(1/2)*3^(1/2)+8*3^(1/2)*(5+5^(1/2))^(1/2)+4*2^(1/2)+8*(5+5^(1/2))^(1/2)+(8*I)*(32-2*5^(1/2)*2^(1/2)*(5+5^(1/2))^(1/2)-4*5^(1/2)*3^(1/2)+2*2^(1/2)*(5+5^(1/2))^(1/2)-4*3^(1/2))^(1/2))^(1/3)}


Download cosine_1_degree.mw

I was looking for Joe's ListBuffer code, but the (seven-year-old) link in the original post is dead.

A great solution, Markiyan. What led you to do it the way that you did? Would you recommend to always separate out the non-differentiated functions from a DAE system when it is algebraically possible to do so?

A great solution, Markiyan. What led you to do it the way that you did? Would you recommend to always separate out the non-differentiated functions from a DAE system when it is algebraically possible to do so?

It's a great question, but the full answer gets very complicated. Would you be satisfied with log10 being an inert function which would only be evaluated when you explicitly asked for it to be, and then it would be converted to ln? This would be relatively easy.

You seem to be asking the same question over and over, since 20-Feb-2013. Have you seen the answers? You never responded to the answers. If an answer doesn't work for you, then you should respond there and not create a new thread. Maybe you need to provide a more detailed example, like a worksheet. Maybe it would help if you asked in your native language and we translated.

Please respond to your earlier post and delete this one.

First 683 684 685 686 687 688 689 Last Page 685 of 708