PatrickT

Dr. Patrick T

2108 Reputation

18 Badges

16 years, 306 days

MaplePrimes Activity


These are replies submitted by PatrickT

you forgot the line at the top. It's a call to a package. You need it.

 

you forgot the line at the top. It's a call to a package. You need it.

 

When I posted my initial message, here's what I got, I think:





solve(f=0,x,x=-1..1);
Error, (in solve) invalid arguments

But when I ran the code again today, here's what I got instead:

solve(f=0,x,x=-1..1);
Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is x = -1 .. 1

Has Maple been updated overnight? Had I drunk too much maple syrup?

I most likely ran the first call in the middle of another session, but other than that I can't think of why this discrepancy came up. The second error message is a lot more useful, similar to the one jakubi posted above with dsolve.
 

and sometimes the message is obscure -- what is a "typed procedure"?

f := x-> x^2:
fsolve(f=0,x,x=-1..1);
Error, (in fsolve) Can't handle expressions with typed procedures

simply don't instruct plotsetup to print to a postscript file, i.e. remove the line:

plotsetup(ps,plotoutput=lower[j],plotoptions=`,color,portrait,noborder`):

or insert plotsetup(default); just before you call the plots:-display command

or instruct plotsetup differently, according to your needs -- check the help menu on plotsetup.

simply don't instruct plotsetup to print to a postscript file, i.e. remove the line:

plotsetup(ps,plotoutput=lower[j],plotoptions=`,color,portrait,noborder`):

or insert plotsetup(default); just before you call the plots:-display command

or instruct plotsetup differently, according to your needs -- check the help menu on plotsetup.

that's me,

>First, you need to eval the equation at the solution.

oops I deleted too many lines when I copy-pasted.

>second, you need to accomodate the fact that the result will be a floating-point approximation.

ah yes I hadn't even thought of that, very true, silly me.

that's me,

>First, you need to eval the equation at the solution.

oops I deleted too many lines when I copy-pasted.

>second, you need to accomodate the fact that the result will be a floating-point approximation.

ah yes I hadn't even thought of that, very true, silly me.

If I'm reading correctly, the solutions above solve 3 out of your 4 equations but not all 4 of them.

restart;
fsolve( [-2*C-B=0, A-5*C=0, 5*B+2*A=0, A^2+B^2+C^2-1=0], {A=-1..1,B=-1..1,C=-1..1} ); 
Error, (in fsolve) number of equations, 4, does not match number of variables, 3

fsolve( [A-5*C=0, 5*B+2*A=0, A^2+B^2+C^2-1=0], {A=-1..1,B=-1..1,C=-1..1});

       {A = -0.9128709292, B = 0.3651483717, C = -0.1825741858}

fsolve( [A-5*C=0, 5*B+2*A=0, A^2+B^2+C^2-1=0], {A=-1..1,B=-1..1,C=-1..1}, avoid = % ); #funny that this doesn't seem to work as expected -- it should return the other solution but doesn't

                                       2    2    2
  fsolve([A - 5 C = 0, 5 B + 2 A = 0, A  + B  + C  - 1 = 0],

        {A, B, C}, {A = -1 .. 1, B = -1 .. 1, C = -1 .. 1}, avoid =

        {A = -0.9128709292, B = 0.3651483717, C = -0.1825741858})

is(-2*C-B=0); # the fourth equation is not satisfied by the solutions

                                false


If I'm reading correctly, the solutions above solve 3 out of your 4 equations but not all 4 of them.

restart;
fsolve( [-2*C-B=0, A-5*C=0, 5*B+2*A=0, A^2+B^2+C^2-1=0], {A=-1..1,B=-1..1,C=-1..1} ); 
Error, (in fsolve) number of equations, 4, does not match number of variables, 3

fsolve( [A-5*C=0, 5*B+2*A=0, A^2+B^2+C^2-1=0], {A=-1..1,B=-1..1,C=-1..1});

       {A = -0.9128709292, B = 0.3651483717, C = -0.1825741858}

fsolve( [A-5*C=0, 5*B+2*A=0, A^2+B^2+C^2-1=0], {A=-1..1,B=-1..1,C=-1..1}, avoid = % ); #funny that this doesn't seem to work as expected -- it should return the other solution but doesn't

                                       2    2    2
  fsolve([A - 5 C = 0, 5 B + 2 A = 0, A  + B  + C  - 1 = 0],

        {A, B, C}, {A = -1 .. 1, B = -1 .. 1, C = -1 .. 1}, avoid =

        {A = -0.9128709292, B = 0.3651483717, C = -0.1825741858})

is(-2*C-B=0); # the fourth equation is not satisfied by the solutions

                                false


well that's good news Will, I can't wait!

> Is LaTeX relevant for the main Maplesoft market?

A survey would be one way to find out.

I have recently stopped producing simple plots with Maple and do them directly in LaTeX, with pstricks and pstricks-add. They look miles better and, after the initial learning phase, are just as easy to produce. It's a shame because I've always been fond of Maple.

I like chart, thanks for the pointer.

I like chart, thanks for the pointer.

I'll answer my own question -- but allow me to ask: is this the most efficient way to construct the matrix below?



hdr := < < `x`          | `f(x)` >,
         < `----------` | `----------` > >:
X := [1, 2, 3, 4, 5]:
body := < seq( < x | f(x) >, x = X ) >:
< hdr, body >;

                      [    x            f(x)   ]
                      [                        ]
                      [----------    ----------]
                      [                        ]
                      [    1            f(1)   ]
                      [                        ]
                      [    2            f(2)   ]
                      [                        ]
                      [    3            f(3)   ]
                      [                        ]
                      [    4            f(4)   ]
                      [                        ]
                      [    5            f(5)   ]

First 74 75 76 77 78 79 80 Last Page 76 of 93