Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 29 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@goli Sometimes the roots of a polynomial can be expressed using sin and cos even though they can't be expressed in radicals. For example, it's easy to see that the 13 roots of x^13 - 1 are

[seq(cos(2*Pi/13*k)+I*sin(2*Pi/13*k), k= 0..12)]

although I believe that there's provably no way to put those in radical form (if I'm wrong about that, there are definitely larger denominators for which it is provably impossible).

@goli The outermost RootOf expression is degree 3, so there can't be a root with index=4. Each index applies only to the specific RootOf that it's an argument of, not to the overall system.

@goli When you use explicit, the solutions are expressed in radical form rather than RootOf form where that is possible, which usually means degree-4 or less. But because your original equations have a variable under a square root, not all of these explicit solutions actually satisfy the original system. Because of your parameter l, it cannot tell which of the solutions are the correct ones, (i.e., which satisfy the original equations). When the solutions are in RootOf ​​​​​​form, the use of index is an attempt to specify which solutions actually satisfy them. 

In my opinion, this index stuff for parameterized solutions is not totally trustworthy, and when the parameter is given a numeric variable it is wise to check all the numeric solutions in the original equations.

@goli 

For a system of polynomial equations of degree higher than 1, eliminating variables tends to raise the degree of the remaining equations. This is why you got four roots. Here's a simple example of a pair of quadratic (i.e., degree 2) equations where you can easily eliminate a variable "by hand":

x^2 + x           + y       = 1, 
      x +   y^2 +       x*y = 2

You can solve the first equation for y:
     y = 1 - x^2 - x.

Substitute for y in the second equation:
     x + (1-x^2-x)^2 + x*(1-x^2-x) = 2.

Now you have a degree-4 equation. Since the original equations are polynomial (no radicals), all 4 roots of that yield valid solutions of the system.

That's the algebraic answer. The same thing can be easily understood geometrically. We know that ellipses can be described by degree-2 equations in two variables. The solutions of a pair of bivariate equations are the intersections of the corresponding curves. So, there are four solutions to the following pair:

plots:-implicitplot([x^2 + 2*y^2 = 1, 2*x^2 + y^2 = 1], x= -2..2, y= -2..2);

Here's more bells & whistles. The command plots:-textplot can be used to place formatted, rotated, colored text directly in the plot. This might be what you meant by "add bullet points to this plot". So here's the same plot with annotations of the 4 objects.

L:= y = -3/2*x + 2: Pt:= [2,1]:
m:= -1/implicitdiff(L, y, x):
Lperp:= y = m*(x-Pt[1]) + Pt[2]:
PtInt:= eval([x,y], solve({L, Lperp})):
plots:-display(
    plot(
        #Options specific to plotted objects:
        [rhs(L), rhs(Lperp), [PtInt], [Pt]], 
        x= -5..5, view= [-5..5, -5..5],
        style= [line$2, point$2], color= [red, "DarkGreen", black, red],
        symbolsize= 18, symbol= [solidcircle, soliddiamond],
        thickness= 0, 
        legend= [
            typeset(L, `\t`), 
            typeset(Lperp, ` `, `#mo(⊥)`,`\t`),
            typeset(`\n`, PtInt, `\n\t\t`),
            Pt
        ],
        #options specific to axes:
        labels= [x,y],
        axesfont= [Helvetica, Bold, 10],
        #options for whole plot: 
        caption= "\nExample 7: The given information is in red.", 
        captionfont= [Times, 18],
        title= "Perpendicular Lines\n", titlefont= [Helvetica, Bold],
        legendstyle= [location= bottom, font= [Times, Bold, 14]],
        scaling= constrained, size= [900$2]
    ),
    plots:-textplot(
        [
            [
                Pt[1]+.6, Pt[2]+1, 
                typeset(`#mo(⊥)`, ` `, Lperp), 
                rotation= arctan(m), 
                align= {above, right}, color= "DarkGreen"
            ],
            [Pt[], typeset(`  `, Pt), align= right, color= red],
            [
                PtInt[], typeset(`     `, PtInt), align= right, 
                font= [Times, Bold, 10]
            ],
            [
                -2, eval(rhs(L), x= -2) - 1, typeset(L), color= red,
                rotation= arctan(-1/m)
            ]
        ],
        font= [Times, Bold, 14]      
    )
);

@mmcdara I wouldn't consider these usages of to be neutral operators. These symbols have no meaning to the kernel as operators, whereas &*, etc., do. But an appropriate help page for this would be ?symbol, and a link to that should appear on ?&.

@permanoon123 You'll learn much better by typing it in yourself.

I have a feeling that your mathematical abilities are at a significantly higher level than the book that you're using. What grade are you in, and what math, statistics, or computer science courses are you currently taking in school?

@Kitonum I should've used realcons instead of numeric to catch symbolic constants like your Pi:

plots:-display(
    [seq](
        plot3d(0, op([1,2],j), op(2,j)),
        j= indets(J, Int(Int(algebraic, name= range(algebraic)), name= range(realcons)))
    ),
    orientation= [180, 0, 180]
);

Now this will handle your most-recent case as well as the earlier VectorCalculus cases.

I'll admit that there was no good reason for me to use numeric; it was just my mistake.

@Kitonum My method is only intended for VectorCalculus:-int integrals in rectangular coordinates, not for integrals "written in the usual way". Obviously you can see how it can be modified to handle the case that you present.

@Kitonum Thank you for bringing this situation to my attention. The following plotting command will handle such cases as well as the original case:

plots:-display(
    [seq](
        plot3d(0, op([1,2],j), op(2,j)),
        j= indets(J, Int(Int(algebraic, name= range(algebraic)), name= range(numeric)))
    ),
    orientation= [180, 0, 180]
);

@JanBSDenmark You can force use of real branches with the RealDomain package. You can also include x > 0 in the solve command:

solve({f(x) = 5., x > 0})

@Jjjones98 The notation Diraderivatrc(n,t) is described on the ?Dirac help page. It's a generalized derivative of Dirac(t).

@dharr The return values of Eigenvectors are a vector and matrix (both types of rtable). When nops is used on an rtable, it does not tell you the number of elements! Indeed, the result is usually 3. The command for the number of elements of an rtable is numelems. There were 4 eigenvalues and eigenvectors for both the cases that you reported as having 3. Since the eigenvectors are returned as a matrix, they can't be counted with numelems either. You need to count the nonzero columns of the matrix.

The command Eigenvalues works on all these examples, so there's no need to find the eigenvalues "the hard way". The problem only occurs when computing the eigenvectors.

 

 

@acer You wrote: 

  • I'm also waiting for the world's infatuation with thin clients and the cloud to end.

This may not be what you meant by "the cloud", but I don't think that people will ever grow tired of being able to access their documents from nearly any computer/phone in the world.

First 218 219 220 221 222 223 224 Last Page 220 of 709