acer

32313 Reputation

29 Badges

19 years, 314 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

Just enter this directly into Maple (with the question mark), and hit return:
?IterativeSolver

Or enter this into the help-window's search field (without the question mark):
IterativeSolver

acer

Just enter this directly into Maple (with the question mark), and hit return:
?IterativeSolver

Or enter this into the help-window's search field (without the question mark):
IterativeSolver

acer

Look here.

acer

Look here.

acer

What you need to know here is what is meant by the average value of a continuous function over a range.

For a discrete problem (eg. height of a finite number of people in a class) the average is usually taken to be the sum of their heights divided by the number of people.

So, for a continuous range of values (x values) how do you "add up" all the values? Isn't it by finding the area under the curve? And how do you "divide by the number of values"? Isn't it by dividing by the length of the range?

acer

What you need to know here is what is meant by the average value of a continuous function over a range.

For a discrete problem (eg. height of a finite number of people in a class) the average is usually taken to be the sum of their heights divided by the number of people.

So, for a continuous range of values (x values) how do you "add up" all the values? Isn't it by finding the area under the curve? And how do you "divide by the number of values"? Isn't it by dividing by the length of the range?

acer

You don't need `maximize` or `minimize` in order to find values of x where f becomes flat (ie. where the slope of f gets to zero).

> f := cos((1+sin(x))^(1/2));
                                                1/2
                           f := cos((1 + sin(x))   )

> df := diff(f,x);
                                               1/2
                               sin((1 + sin(x))   ) cos(x)
                    df := -1/2 ---------------------------
                                                 1/2
                                     (1 + sin(x))

Look df can only be zero when one of the two factors of the numerator of df is zero. By that I mean, only when either cos(x) is zero or sin((1+sin(x))^(1/2)) is zero. And any such special values must lie within 0..5, which is the range that you were given.

So, what value in 0..5 makes cos(x) to be zero?

Now look. sin(0) is 0, yes? So, if (1+sin(x))^(1/2) were zero then sin((1+sin(x))^(1/2)) would also be zero. And if 1+sin(x) were zero then (1+sin(x))^(1/2) would be zero. So what value of x in 0..5 makes 1+sin(x) be zero? What value of x in 0..5 makes sin(x) be -1 ?

But watch out! When (1+sin(x))^(1/2) is zero then the denominator of df will also be zero! And you may not just divide, 0/0. So check the limit, and the graph.

> eval(df,x=3*Pi/2);
Error, numeric exception: division by zero
> limit(df,x=3*Pi/2);
                                       0

plot( f, x=0..5 );

You see, you don't have to resort to the maximize() and minimize().

maximize( f, x=0..5, location );
minimize( f, x=0..5, location );

acer

You don't need `maximize` or `minimize` in order to find values of x where f becomes flat (ie. where the slope of f gets to zero).

> f := cos((1+sin(x))^(1/2));
                                                1/2
                           f := cos((1 + sin(x))   )

> df := diff(f,x);
                                               1/2
                               sin((1 + sin(x))   ) cos(x)
                    df := -1/2 ---------------------------
                                                 1/2
                                     (1 + sin(x))

Look df can only be zero when one of the two factors of the numerator of df is zero. By that I mean, only when either cos(x) is zero or sin((1+sin(x))^(1/2)) is zero. And any such special values must lie within 0..5, which is the range that you were given.

So, what value in 0..5 makes cos(x) to be zero?

Now look. sin(0) is 0, yes? So, if (1+sin(x))^(1/2) were zero then sin((1+sin(x))^(1/2)) would also be zero. And if 1+sin(x) were zero then (1+sin(x))^(1/2) would be zero. So what value of x in 0..5 makes 1+sin(x) be zero? What value of x in 0..5 makes sin(x) be -1 ?

But watch out! When (1+sin(x))^(1/2) is zero then the denominator of df will also be zero! And you may not just divide, 0/0. So check the limit, and the graph.

> eval(df,x=3*Pi/2);
Error, numeric exception: division by zero
> limit(df,x=3*Pi/2);
                                       0

plot( f, x=0..5 );

You see, you don't have to resort to the maximize() and minimize().

maximize( f, x=0..5, location );
minimize( f, x=0..5, location );

acer

The only thing I had to use was a single CrossProduct call (once normals S1 and S2 are obtained) to get the Vector that is perpendicular to both normals. That's simpler than two Nullspace calls and an IntersectionBasis call. And it's simpler than using `solve` as above, because the CrossProduct technique is quite understandable -- which is very likely why the hint is as it is.

Those DotProduct calls that I included, as checks which illustrated the perpendicular quality of the result, are just that: checks. Not necessary for getting the result. One should already know that they will come out OK. But this student is learning.

The (instructor'?) hint was to use the fact that the resulting line must be perpendicular to both planes (and hence to both normals). So CrossProduct is the (standard) simple way to get that.

Indeed, CrossProduct, DotProduct, and the equation forms for planes and lines is all one needs to solve most of the problems like this in a nice class. (That's also why I put those checks -- to help get that point home.) Getting familiar with those two routines, and the ramifications of their results, is usually what this level of linear algebra instruction is all about. Learn how to solve one problem like this by hand and one has a head start on others.

But one wants to get students to think about why it works, and not just put down,

r0 + t*LinearAlgebra[CrossProduct](S1, S2);

I just wish that this were the sort of content in more of the help Tasks. Too many of the Tasks are simple things (better) covered by some routine's single help-page.

acer

The only thing I had to use was a single CrossProduct call (once normals S1 and S2 are obtained) to get the Vector that is perpendicular to both normals. That's simpler than two Nullspace calls and an IntersectionBasis call. And it's simpler than using `solve` as above, because the CrossProduct technique is quite understandable -- which is very likely why the hint is as it is.

Those DotProduct calls that I included, as checks which illustrated the perpendicular quality of the result, are just that: checks. Not necessary for getting the result. One should already know that they will come out OK. But this student is learning.

The (instructor'?) hint was to use the fact that the resulting line must be perpendicular to both planes (and hence to both normals). So CrossProduct is the (standard) simple way to get that.

Indeed, CrossProduct, DotProduct, and the equation forms for planes and lines is all one needs to solve most of the problems like this in a nice class. (That's also why I put those checks -- to help get that point home.) Getting familiar with those two routines, and the ramifications of their results, is usually what this level of linear algebra instruction is all about. Learn how to solve one problem like this by hand and one has a head start on others.

But one wants to get students to think about why it works, and not just put down,

r0 + t*LinearAlgebra[CrossProduct](S1, S2);

I just wish that this were the sort of content in more of the help Tasks. Too many of the Tasks are simple things (better) covered by some routine's single help-page.

acer

It seems likely that you are supposed to give justifications about the maximum and minimum in terms of calculus. So just getting the answer directly from Maple's `maximize` routine won't help with the explanation.

If the maximum and minimum do not occur at the boundary of the region, then what happens to the derivative of f at the points at which f is maximum and minimum?

acer

It seems likely that you are supposed to give justifications about the maximum and minimum in terms of calculus. So just getting the answer directly from Maple's `maximize` routine won't help with the explanation.

If the maximum and minimum do not occur at the boundary of the region, then what happens to the derivative of f at the points at which f is maximum and minimum?

acer

Yes, I had considered this frontend use, but it wasn't clear to me what the final goal was. That is to say, what would be done with the result. I guessed the "wrong" way, and changed the Dirac(v) term so that an example might appear useful. The OP's followup question made it a clearer, so Joe's frontend suggestion is better.

acer

Yes, I had considered this frontend use, but it wasn't clear to me what the final goal was. That is to say, what would be done with the result. I guessed the "wrong" way, and changed the Dirac(v) term so that an example might appear useful. The OP's followup question made it a clearer, so Joe's frontend suggestion is better.

acer

> m := matrix([[1,"t"],[3.4,17]]);
                                    [ 1     "t"]
                               A := [          ]
                                    [3.4    17 ]
 
> writedata(terminal,m,string,
>           proc(f,x::algebraic) fprintf(f,`%a`,x) end proc);
1       t
3.4     17

acer

First 539 540 541 542 543 544 545 Last Page 541 of 591