Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

Hi,

1st post. I'm trying to integrate the following function:

h:=t->(2*t-1)*cos*sqrt(3*(2*t-1)^2+6)/(sqrt(3*(2*t-1)^2+6));

h:=t->(2*t-1)*cos*(sqrt(3*(2*t-1)^2+6))/(sqrt(3*(2*t-1)^2+6));

h:=t->(2*t-1)*(cos*(sqrt(3*(2*t-1)^2+6)))/(sqrt(3*(2*t-1)^2+6));

h:=t->((2*t-1)*(cos*(sqrt(3*(2*t-1)^2+6))))/(sqrt(3*(2*t-1)^2+6));

int(h(t),t); ** Integration command. I've also replaced the "h(t)" with the entire function.

I've tried the following:

1. Changed the "t" to "x" throughout function.

2. Added parens around sqrt portion.

3. Added parens to include "cos" and then added to include the beginning (2*t-1).

4. I've added brackets around the numerator but this just causes Maple to reprint the function with the inegration sign in front of the function.

5. I've also tried using the Integration tutor. It returns that maple is unable to calculate.

6. Repeat all the above in Maple 2015, same answer.

I always get cos(t^2-t).

The math book claims the answer is 1/6*sin*sqrt(3*(2*t-1)^2+6). When I perform the inegration on paper I get the same answer.

Any suggestions or corrections would be great.

Thank you,

Jay.

 

updated:

with(CurveFitting);
f := PolynomialInterpolation([[0, x0],[1, x1],[2, x2],[3, x3],[4, x4]], x);
f2 := solve(f=y,x);
area1 := int(f, x=0..1);
with(student):
area2 := trapezoid(f2[1], x = 0..1);
with(CurveFitting);
f := PolynomialInterpolation([[0, x0],[1, x1],[2, x2],[3, x3]], x);
f2 := solve(f=y,x);
area1 := int(f, x=0..1);
with(student):
area2 := trapezoid(f2[1], x = 0..1);

 

i use 5 points trapezoid got RootOf  in result,

only 4 points is acceptable

 

when i try 5 points, there is no problem, but when more points such as

30 points, got RootOf for c sharp code

 

moreover, i got a problem when i copy the area1 result into 

visual studio c# code, it has error Integral Constant is too large

 

with(CurveFitting);
f := PolynomialInterpolation([[0, x0],[1, x1],[2, x2],[3, x3],[4, x4],[5, x5],[6, x6],[7, x7],[8, x8],[9, x9],[10, x10],[11, x11],[12, x12],[13, x13],[14, x14],[15, x15],[16, x16],[17, x17],[18, x18],[19, x19],[20, x20],[21, x21],[22, x22],[23, x23],[24, x24],[25, x25],[26, x26],[27, x27],[28, x28],[29, x29]], x);
f2 := solve(f=y,x);
area1 := int(f, y=0..1);
with(student):
area2 := trapezoid(f2[1], x = 0..1);
with(CodeGeneration):
CSharp(area1, resultname = "area1");
CSharp(area2, resultname = "area2");

i find area2 has

Warning, the function names {RootOf, Sum} are not recognized in the target language
Warning, precedence for Range unspecified
Warning, cannot translate range
area2 = RootOf((System.Double) (19276689540529530246975515949293568 * x3 - 2626509155780373903082144116707328 * x2 + 239680950855919251544490932629504 * x1 -


Hello! 

I'm trying to plt something, I can't see why Maple isn't multiplying these two rows as it should. 

Can anyone see the problem?

 

This preamble is loaded:

restart;

with(Units[Standard]);
with(ArrayTools);

with(LinearAlgebra);

with(Statistics);
with(plots);
with(CurveFitting);

 

 

 

 

 

with(plots):

with(LinearAlgebra):

 

asd := [3.5400000*10^5, 3.4700000*10^5, 3.3700000*10^5, 3.2700000*10^5, 3.1700000*10^5, 3.0900000*10^5, 3.0300000*10^5, 2.9600000*10^5, 2.9200000*10^5, 2.8900000*10^5, 2.8600000*10^5, 2.8500000*10^5, 2.8200000*10^5, 2.8100000*10^5, 2.7900000*10^5, 2.7800000*10^5, 2.7800000*10^5, 2.7700000*10^5, 2.7600000*10^5]:
 

NULL

asf := [0.2866400798e-1, 0.6112772793e-1, 0.9946549241e-1, .1349950150, .1645923341, .1877395591, .2054364684, .2189514789, .2293646837, .2374847679, .2439099369, .2490583805, .2532402792, .2566744211, .2595269747, .2619197962, .2639470478, .2656751966, .2671596322]:

 

asd*asf;

[354000.0000, 347000.0000, 337000.0000, 327000.0000, 317000.0000, 309000.0000, 303000.0000, 296000.0000, 292000.0000, 289000.0000, 286000.0000, 285000.0000, 282000.0000, 281000.0000, 279000.0000, 278000.0000, 278000.0000, 277000.0000, 276000.0000]*[0.2866400798e-1, 0.6112772793e-1, 0.9946549241e-1, .1349950150, .1645923341, .1877395591, .2054364684, .2189514789, .2293646837, .2374847679, .2439099369, .2490583805, .2532402792, .2566744211, .2595269747, .2619197962, .2639470478, .2656751966, .2671596322]

(1)

 

NULL

 

Thank you!

Download maple_what.mw

I am a beginer in Maple, and even more beginner with differential geometry on maple. I am trying two dayes now to define the following Lie group on Maple by reading the help guid of DifferentialGeometry and some documents on the web, but I failed. Now I am seeking for your assistance, Plese help me and thanks for being as xplicite as you can.

The group I want to introduce is the real lie group

$ \mathbb R \times \mathbb C $ () equipped with the group law
$$ (x_0,x) \cdot (y_0,y) = (x_0+y_0+\frac{1}{2}Im(x\bar{y}), x+y) $$

(I didn't figure out how to use something other than LaTeX code)

For illustration purpose I am sticking with the above simple example, but I want next to move to higher dimensions analog.
I want also an explication about how Maple distinguishes between a real and complex coordinate.

I want next to compute  the left multiplication pushforward of a tangent vector of the identity.
Then compute the structure constants of the Lie algebra associated. I think Maple can do this kind of manipulation without problem, am I wrong?

I want to apologize if this being neither necessarily a minimal working example for one question nor just one question is uncomfortable. The "MWE" was created on and is designed for Linux machines including ImageMagick. The problem itself should be obvious to all users though, as the subfolder and creation of the gif are just conveniences. I have three sections concerning the different problems occuring in my attempts.

(which I was told is not doable in maple ... hence the gif)

link

The goal was to create an animation that zooms in on a function. As maple just wouldn't allow scaling of axis in animations I decided to export single frames and then convert those with ImageMagick. Maple offers ssystem(„...“) which allows for command line usage.

The problem (may as well be a bug) occurs when I try to export images in a for loop with exportplot(...). If the path as well as previously exported images exist, it won't output an error but still not export the desired images. Exporting frames separately works just fine, as well as doing the very same operation in a separate for loop.

(see the first red comment and export section)

After using the workaround in a second for loop. I couldn't figure out how to import the images and then create an animation from them. The main obstacle is the fact that the imported pictures are put into plot-functions.

(see the second red comment)

 

restart;

with(plottools):

f1 := s -> sin(2*s):

max_frame := 10: # = number of steps

for k from 0 to max_frame do
    pic[k] := plot(f1(x), x=-Pi*(1-k/max_frame)..Pi*(1-k/max_frame),
                    filled=true, #color = ["Orange"],
                    color = ColorTools:-Color([0,
                                              floor(128*k/max_frame),
                                              floor(255*k/max_frame)
                                              ]),
                    view=[-Pi*(1-k/max_frame)..Pi*(1-k/max_frame), -1..1]
                    ):
end do:

path := FileTools:-TemporaryDirectory();
path_list := ssystem("pwd");
path := path_list[2];
ssystem("mkdir ./pics"); # creates a subfolder
path := FileTools:-JoinPath([path, "pics"]); # need to change path to subfolder

plotsetup(window, plotoptions="width=480, height=600");
for k from 0 to max_frame do
    file[k] := FileTools:-JoinPath([path,
                                     MapleTA:-Builtin:-strcat("frame_",
                                                              convert(k, string),
                                                              ".jpg")
                                    ]);
    # exportplot(file[k], pic[k]); # does not work
end do:

exportplot(file[0], pic[0]); # works

# =====================================================================================
# export
# =====================================================================================
for k from 0 to max_frame do
  exportplot(file[k], pic[k]);
od; # also works

# =====================================================================================
# import
# =====================================================================================
for k from 0 to max_frame do
    reimported_pic[k] := importplot(file[k]); # this might take a while (depending on the amount of frames)
end do: # import works but [Length of output exceeds limit of 1000000]

whattype(reimported_pic[0]); #seems to create a plot function
show := convert(reimported_pic,list):
#Error, while processing result #There is no help page available for this error

show[1]; # works

# =====================================================================================
# create an animated gif at least
# =====================================================================================
delay_time := ceil(evalf(100/max_frame));
command_for_gif := MapleTA:-Builtin:-strcat("convert -delay ",
                                            convert(delay_time, string),
                                            " -loop 0 ", # -reverse ",
                                            FileTools:-JoinPath([path, "frame_*.jpg "]),
                                            FileTools:-JoinPath([path, "animation.gif"])
                                            );
ssystem(command_for_gif);

 

 

Download bug_report_maybe.mw

 

I would be grateful for any suggestions. Moreover I have run accross

?DocumentTools:-Components:-VideoPlayer

which I could not figure out how to use by the help pages (I tried to create an avi and import that). If someone has informations on that, please share!

I'm sorry for asking too many similar technical questions, but I just can't help this.

I'm solving a system of differential equations with dsolve and getting this type of error:

Error, (in f) unable to store 'HFloat(0.10664489706950975)+HFloat(1.1891638418458722e-5)*sin^2-HFloat(1.6095871822513048e-6)*sin' when datatype=float[8]

I checked the dsolve syntax, checked that all the constants are defined, checked that the number of equations matches the number of unknown functions (and there is no misprints of them in the code). In brief, I checked all the stuff that I usually have mistakes in, and yet the error stands. 

Here's the file: 1.mw

I have a number of dots that lie on the sphere. I want to draw a handsome sphere with three axes, put dots on the sphere and connect them. The problem is that some dots are pretty far from the other and so the line connecting them goes under the surface of the sphere and so is not seen. Therefore the question, how the dots can be connected so the line would be seen (or the line would lie on the surface of the sphere)?

Here's the file:ClassicalTrajectoriesAr-CO2.mw

in internet or maple, is there a neural network package in maple?

i find example link after googled, however, still feeling not easy to apply to data.

is there the most simplest version for two columns of data ?

which algorithm can be used to mining data set in maple after feature extraction

hope systematic and automatic doing this instead of using eyes

 

i feel derived attributes are unlimited, how to know sufficient?

in real practice, 

what is application of the cycles in algcurves[homology] ?

is there any book teaching about the use of this function in maple?

I would like work in Riemann Normal Coordinates, and derive expansion in number of derivatives of the metric.

For example, starting with the expansion of the metric in Riemann Normal Coordinates (assuming this needs not be derived)

\displaystyle  \begin{array}{rcl}  g_{ij}(x)&=& \delta_{ij} -\frac 1 3 R_{iklj}x^kx^l -\frac 1 6 R_{iklj;m} x^kx^lx^m\\ &&+ (\frac2{45} R_{ilmk}R_{jpqk}- \frac 1 {20} R_{ilmj;pq})x^lx^m x^p x^q\\ &&+(-\frac 1{90} R_{iklj;mpq}+\frac 2{45} R_{iklr;m}R_{jpqr})x^kx^lx^mx^px^q\\ && +(-\frac 1 {504}R_{iklj;mpqr}+ \frac{17}{1260}R_{ikls;pq}R_{jmps}+ \frac{11}{1008}R_{ikls;q}R_{jmps;r}\\ && +\frac 1{315}R_{ilms}R_{jqrt}R_{kspt})x^kx^lx^mx^px^qx^r +O(|x|^7). \end{array}

I would like to express the lapliacian, or square-root of the determinant ... etc., in terms of this metric and derive an expansion for them.

However, I cannot even define the metric as such in Maple-Physics, because the coefficients of xk depend themselfs upon the metric to be defined.

Is there a way to do such calculations in Maple ?

Could someone please explain to me why the procedure GraphTheory:-CycleBasis requires that the vertices of a graph be integers for it to work correctly ?
(while the definition of a graph supports other types of vertex names)


restart:
with(GraphTheory):

#------------------------------------------------------- test 1

g1 := Graph({{"a", 1}, {1, 3}, {"a", 3}});
DrawGraph(g1);
CycleBasis(g1);

Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: "a" < 1

#------------------------------------------------------- test 2

g2 := Graph({{a, 1}, {1, 3}, {a, 3}});
CycleBasis(g2);

Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: a < 1

 

#------------------------------------------------------- test 3

g3 := Graph({{4, 1}, {1, 3}, {4, 3}});
CycleBasis(g3);

[[1, 3, 4]]

 
Knowing this limitation I usually rename to integers the vertices of the graphs, next do some operations, and next go back to the original names.


Thanks for any explanation.

I have exported a maple document to latex, but it only shows the output of the commands used. Rather than the commands, and the procedures.

How do I get both to export together? and show up together?

 

 

Hello,

The following problem works if i = j.   I need help to fix this problem for i ≠ j.  Thanks

A := [1, 2, 3, 4, 5];

B := [a, b, c, d];

seq([A[i], B[j]], i = 1 .. 5, j = 1 .. 4);
Error, invalid input: seq expects its 3rd argument, step, to be of type numeric, but received j = 1 .. 4

What is the Maple command to simplify  -x^(a)+x^n  to zero under the assumption that a=n?

I have attempted the following command

simplify(-x^(a)+x^n) assuming a=n;

However, it did not produce zero. The following command however produces zero

subs(a=n,-x^(a)+x^n);

 How to do this operation using assumptions. How to inform Maple to assume that a=n.

 

First 38 39 40 41 42 43 44 Last Page 40 of 71