Thomas Madden

183 Reputation

7 Badges

20 years, 23 days

MaplePrimes Activity


These are answers submitted by Thomas Madden

Thanks J. Tarr, Axel, and Joe for your responses. J. Tarr thanks for the quick fix. The extra commas would not be a problem. However, I just tried Joe's procedure and it worked beautifully. It is very flexible and I think I will be using it often. Joe, thanks for taking the time to write and post it. Thomas
Thanks Georgios and Marvin, Unfortunately, as Georgios noted, printf does not seem to output the subscripts and superscripts in prettyprint. I can use an alternate notation which is no problem. I just thought that there might be a simple way to insert spaces using print which I was unable to figure out. Thomas
I think this can be done with overload. See ?overload. Hope this helps, Thomas
For a specific value of k you can use MatrixPower in the in the LinearAlgebra package. with(LinearAlgebra): A:=Matrix([[r1*x,(1-r1)*x], [1-r2, r2]]); MatrixPower(A,2); Hope this helps, Thomas

If you just want the direction field you can use dfieldplot.

I put in some of the options you can also use. See ?dfieldplot

> restart:

> with(DEtools): with(PDEtools):

> declare(y(t), prime = t);

Maple Equation

Maple Equation

> ode:=diff(y(t),t)*t + 2*y(t) = sin(t);

Maple Equation

> dfieldplot(ode, y(t), t=-6..6, y=-4..4,
color=rhs(ode), title = "ty' + 2y = sin(t)",
titlefont = [TIMES,ROMAN,16]);

Maple Plot

>

Hope this helps,

Thomas

This post was generated using the MaplePrimes File Manager

View 162_dfieldplot.mw on MapleNet or Download 162_dfieldplot.mw
View file details

I was wondering about that. In fact, that is what I originally thought was wrong when I looked at the OP. Then I noticed it worked in this case without brackets. I probably should have inserted them to be safe. Thanks for pointing that out. Thomas
You have to load the plots package first by typing with(plots); or use the long form plots[display](A,B); Thomas

Here is one method that can be used.

Note:

In your question you used Matrix with a capital M and matrix with a lower case m.

In Maple there is a difference. Matrix is used with the newer LinearAlgebra package

in Maple 10. In older versions matrix is used with the linalg package.

Method using Maple 10.

> restart:

> with(LinearAlgebra):

> A:= Matrix([[8,-3,0,-7,2],[-9,4,5,11,-7],[6,-2,2,-4,4],[5,-1,7,0,10]]);

Maple Equation

> ColumnVectors:= Column(A,[1..5]);

Maple Equation

> Basis([ColumnVectors]);

Maple Equation

> B:= SubMatrix(A,[1..4],[1,2,5]);

Maple Equation

> b:= Vector([0,0,0,0]);

Maple Equation

> LinearSolve(B,b);

Maple Equation

Note:

You can check to see that the 3rd and 4th column vectors of A are in the

span of the first two column vectors. So B is not a unique solution

to this problem.

> LinearSolve(SubMatrix(A,[1..4],[1..2]), Column(A,3));

Maple Equation

> 3*Column(A,1) + 8*Column(A,2);

Maple Equation

However, the columns of B form a basis for the

column space of A. So the maximum number of columns you

can use is 3.

If you do not have Maple 10 here are the corresponding commands

for the linalg package. (See Help)

> restart:

> with(linalg):

> A:= matrix([[8,-3,0,-7,2],[-9,4,5,11,-7],[6,-2,2,-4,4],[5,-1,7,0,10]]);

> ColumnVectors:= col(A, 1..5);

> basis([ColumnVectors]);

> B:= submatrix(A, 1..4, [1,2,5]);

> b:= vector([0,0,0,0]);

> linsolve(B,b);

>

Hope this helps,

Thomas

This post was generated using the MaplePrimes File Manager

View 162_162_Basis.mw on MapleNet or Download 162_162_Basis.mw
View file details

George, I don't really have any experience with this but you might want to look at overload in the help pages. Thomas
f1:= 100 + sin(x + 3)^3; f2:= convert( taylor(f1, x=1, 2), polynom); f3:= convert( taylor(f1, x=1, 3), polynom); plot( [f1,f2,f3], x=-2..2);
If I understand the question correctly all you have to do is count the minima for the integer values of k from 3 to 9 and see for which of these values the number or minima drops from 4 to 3 and then from 3 to 2. Note that h3d(x,3) = h1(x) when k = 3 h3d(x,6) = h2(x) when k = 6 hd3(x,9) = h3(x) when k = 9 If you plot each of h1, h2, and h3 you can see the number of minima in the graphs and count them. Now substitute k = 4, 5, 7, 8 in h3d(x,k) and plot each of these. That is plot h3d(x,4), h3d(x,5), h3d(x,7) and h3d(x,8). Then you can see from the graphs for which of these values of k the number of minima drops from 4 to 3 and then from 3 to 2. That is plot h3d(x,4), h3d(x,5), h3d(x,7) and h3d(x,8) and count the number of minima in each of these graphs. Alec has actually done all of this for you. If you look at his animation and stop it a k = 4, 5, 6, 7 and 8 then you will be looking at the graphs of h3d(x,4), h3d(x,5) ... When I did this I still count 4 when k = 4 but I only count 3 when k = 5, and the next drop is at k = 8. Remember even though the drops occur at numbers in between we are only looking at integer values of k. If this is confusing just do the plots one at a time as suggested above and count the number of minima in each of the graphs. I really think this is all your professor is asking for. I think the problem of finding values for k where k is not an integer seems too complex for a 1st year calculus course. Off the top of my head I am not even sure how you would approach it beyond what Alec has suggested. Hope this is helpful, Thomas
I have a hunch she means for k an integer between 3 and 9 inclusive, since it is typical to use k to represent integers. Is there any other information in the problem or in your notes that might indicate this? Thomas
You can also use ListTools[Flatten]. See help, ListTools. In particular, Flatten and FlattenOnce. There are a number of other commands in this package that you may find helpful. Thomas
It is part of the LinearAlgebra Package. LinearAlgebra[Trace]

> restart:

> with(CurveFitting):  with(plots):

> xydata := [[0,0],[1,1],[2,4],[3,3]];

Maple Equation

> f := Spline(xydata, x);

Maple Equation

> p1 := pointplot(xydata, color=blue, symbolsize=15):

> p2 := plot(f, x=-5..5, y=-5..5):

> display([p1,p2]);

Maple Plot

>

This post generated using the online HTML conversion tool
Download the original worksheet

1 2 3 4 5 6 Page 5 of 6