gulliet

241 Reputation

6 Badges

16 years, 263 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by gulliet

An afterthought, but it seems that in the definition of p3 the double sequence provides values for k and n; however the computed expressions are also dependent of u and v, which do not have any numeric value. So pointplot3d is fed with a list of symbolic arrays, things that it does not know how to handle. Therefore, you must provide some numerical values for u and v before calling poinplot3d or get rid of these variables (perhaps by rewriting them as function of k and n). Regards, -- Jean-Marc
Should not it be pointplot3d rather than pointplot in the the definition of p3? See ?pointplot3d for more info. Regards, -- Jean-Marc
That might not be the solution to all problems, but in the code posted, there is a spurious space between plot3d and the open parenthesis that follows it in definition of p2 (so Maple tries to multiply plot3d by the contents of whaever is between the parentheses). The definition for p2 should be, p2 := plot3d([2.9*sin(u)*cos(v), 2.9*sin(u)*sin(v), 2.9*cos(u)], u = 0 .. Pi, v = 0 .. 2*Pi, color = blue, axes = normal, scaling = constrained); and one gets a nice blue sphere when one evaluates p2. Regards, -- Jean-Marc
One possible way is to use the Digits environment variable.
    |\^/|     Maple 11 (IBM INTEL NT)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> restart;
> help("Digits");
The Digits Environment Variable

Calling Sequence
     Digits := n


Parameters
     n - natural number


Description
- The Digits environment variable controls the number of digits that Maple
  uses when calculating with software floating-point numbers.

- The default value of Digits is 10. The value of Digits is changed by using
  the assignment operator.

- Maple fully evaluates environment variables such as Digits in all contexts.
  Because Digits is an environment variable, any assignments to it inside a
  procedure body are undone upon exit from the procedure.

- The maximum value of Digits is obtained from kernelopts(maxdigits).


Examples
> Digits := 20;

                                 Digits := 20

> f := proc()
>         print( "Entering f. Digits is", Digits );
>         Digits := Digits + 17;
>         print( "Adding 17 to Digits yields", Digits );
> end proc:
> f();

                         "Entering f. Digits is", 20

                       "Adding 17 to Digits yields", 37

> Digits;

                                      20

  When returning from f in the procedure above, Maple resets Digits to its
# value on entry.

> 1.02^10;

                            1.2189944199947571302

> Digits := 5;

                                 Digits := 5

> 1.02^10;

                                    1.2190


See Also
assignment, environmentvariables, evalf, Maple_floats, float, type[float]

> Digits := 6;
                                  Digits := 6

> M := evalf(Matrix([[cos((1/3)*Pi), sin\
> ((1/3)*Pi)], [-sin((1/3)*Pi), cos((1/3)*Pi)]]));
                              [0.500000     0.866025]
                         M := [                     ]
                              [-0.866025    0.500000]

>                            Matrix(%id = 163704560)

Regards, -- Jean-Marc
Assuming I have correctly understood what you are looking for, the following should be help you started.
> restart;
> r[0] := 3; r[1] := 4; 
for i to 100 while r[i-1] <= 300 do r[i+1] := 2*r[i-1]+3*r[i] end do;
                                      3
                                      4
                                     18
                                     62
                                     222
                                     790
                                    2814
Regards, -- Jean-Marc
The following help page "Create Maple Initialization File" will tell you all. Basially, you have to create, or update, a file called "maple.ini" (note that the file is without any version number or anything else). From the online help, for Windows, we can read:
Under Windows, the initialization file is called maple.ini. If \lib\maple.ini exists, it is loaded first (where is your Maple installation directory). With a network installation of Maple, the commands in this initialization file will be executed by all users on the network. To execute a user's personal set of commands, only the first initialization file in one of the following paths will be loaded. 1) The current working directory (for example, "c:\Program_Files\Maple\bin.win\maple.ini") 2) The \Users directory (for example, "c:\Program_Files\Maple\Users\maple.ini") 3) The user's personal profile directory (multiuser only) (for example, "c:\Documents_and_Settings\userid\maple.ini") Maple reads and executes the network initialization file before the personal initialization file.
The path to this page from the table of contents (online help) is "Getting Started" -> "Configure Maple" -> "Initialization Files". HTH, -- Jean-Marc

Here is a step by step approach (by hand) that, I hope, illustrate how to compute the eigenvectors. Note that I am not a Maple expert and I am confident that many steps can be combined in one and that a clever usage of Maple libraries could improve significantly the solution. Also, I had to fight somehow with MaplePrimes HTML interface to render correctly the worksheet :-) Anyway, I hope this helps.

Cheers,
--
Jean-Marc

> Maple Equation

> Maple Equation

Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

> Maple Equation

Maple Equation

Maple Equation

This post was generated using the MaplePrimes File Manager

View 97_eigvectrigmat5.mw on MapleNet or Download 97_eigvectrigmat5.mw
View file details

[UPDATED: Note that the documentation does not need to be updated. See Scott's reply below.] Wow! I release I have been tricked by the first example of the help page for implicitplot. Indeed, I believed that implicitplot was also the name of a package and that one needed both the plots and implicitplot packages loaded to use the implicitplot command! Thanks for the clarification. Regards, -- Jean-Marc
Scott, Many thanks for the information. I must admit that I had never bothered reading the help pages about "help", "with", or "using packages" before you picked my interest. I have just done that and learned quite a few things about commands such as ?, ??, ???, packages(), with() and unwith(), and I get finally a clear idea of how packages and commands are structured and related. I won't claim anymore that the documentation must be changed before checking carefully my understanding of the subject matter :-) Best regards, -- Jean-Marc
It is hard to tell what is going on on your system, but I hope that the following will be helpful. First, let us start with a new session or server. So we have a blank document (standard interface, worksheet mode in the following example) and a fresh server associated to it. Step 1: From the Insert menu, select Plot, and then 2D. 97_drag_1.jpg Here is what you should see after this step: 97_drag_2.jpg Step 2: Enter the expression sin(x) in an input region. Step 3: Select the full expression in the input region and drag it into the plot region. 97_drag_3.jpg On the above screenshot, note the form of the mouse cursor when it is above the plot region, especially the small empty rectangle on the bottom right. Here what should appear on your screen after releasing the left button. Note that the original expression in the input prompt has disappeared. 97_drag_4.jpg Now, say we want to add another expression and also keep it in the input line. To do so, we enter the expression as usual but we also use the Ctrl (control) key when dragging the expression over the plot. Note the plus sign that appears inside the small rectangle at the bottom right of the mouse cursor (if you release the Ctrl key, the plus sign disappears. If you hit the Ctrl key again it comes bask). 97_drag_5.jpg And here is the final result. 97_drag_6.jpg HTH, -- Jean-Marc
Just an after though, but you can draw several plotz in just one command by using lists (denoted by square brackets) for the expressions to be plotted as well as for the options, as the following examples illustrate. (Note that you need to issue the command with(plots, etc.) only once during a session.) with(plots); plot([3*x^2, -3*x^2+40], x = -4 .. 4, color = [orange, blue]) And the following will draw two circles. with(plots, implicitplot); implicitplot([x^2+y^2 = 4, x^2+y^2 = 2], x = -4 .. 4, y = -4 .. 4, color = [orange, blue]); Regards, -- Jean-Marc
If I have correctly understood you, what you are looking for is the function implicitplot. > with(plots, implicitplot); > f1 := implicitplot(x^2+y^2 = 4, x = -4 .. 4, y = -4 .. 4, color = orange); > f2 := implicitplot(x^2+y^2 = 2, x = -2 .. 2, y = -2 .. 2, color = blue); > display(f1, f2); 97_cirlcles.jpeg Regards, -- Jean-Marc
Just an after thought. The second plot in my previous post looks jagged: you can get a smoother contour by setting the option "gridrefine" to a higher value than the default (zero). Below you can see an example with gridrefine set to two: the plot looks prettier.
with(plots, implicitplot); 
implicitplot(cos(x+y) = (x*y)^2, x = -2 .. 2, y = -2 .. 2, gridrefine = 2)
97_impplot_3.jpeg Regards, -- Jean-Marc
Beware to insert an explicit multiplication sign between the variables x and y otherwise Maple believes you want the variable "xy" squared. The following will work as expected (add parentheses around x*y if you meant (x*y)^2 rather than x*(y^2)).
> with(plots, implicitplot);
> implicitplot(cos(x+y) = x*y^2, x = -2 .. 2, y = -2 .. 2);
97_impplot_1.jpeg
> with(plots, implicitplot);
> implicitplot(cos(x+y) = (x*y)^2, x = -2 .. 2, y = -2 .. 2);
97_impplot_2.jpeg Regards, -- Jean-Marc
This is not an optimization problem, but rather a classic study of the variations of a function. First, we define the function and plot it over a suitable interval. Then we check that the limits at plus and minus infinity and see that the function is always increasing (which was expected since it is a quartic with positive coefficient for the highest power). Therefore there exist no absolute maximum. We can find the local maximum and absolute minimum by, first, computing the first derivative and equating to zero so we identify precisely the critical points, then we compute the second derivative and check the sign. We can also plot the first and second derivatives in one plot. The following example should helps you started (note that you still have some work to do and fill in some blanks).
> f := proc (x) options operator, arrow; 3*x^4+2*x^3-15*x^2+13*x+3 end proc;

        4      3       2           
x -> 3 x  + 2 x  - 15 x  + 13 x + 3

> plot(f, -4 .. 4);
97_maxminplot_1.jpeg
> limit(f(x), x = infinity);

                                  infinity

> limit(f(x), x = -infinity);

                                  infinity

> diff(f(x), x);

                              3      2            
                          12 x  + 6 x  - 30 x + 13

> fsolve(12*x^3+6*x^2-30*x+13);

                  -2.011021846, 0.5763495115, 0.9346723349

> map(f, [-2.011021846, .5763495115, .9346723349]);

                  [-51.00552571, 6.223792575, 5.969233122]

> plot([12*x^3+6*x^2-30*x+13, diff(12*x^3+6*x^2-30*x+13, x)], x = -4 .. 4);
97_maxminplot_2.jpeg Regards, -- Jean-Marc
First 7 8 9 10 Page 9 of 10