erik10

I have a degree in Mathematics and Physics from the Danish University Aarhus, comparable to a masters degree with thesis - majoring in Mathematics. In 1991-92 I was a visting scholar at UCLA, Los Angeles, following graduate courses in Applied Mathematics. Since 1992 I have been a teacher in a high school (gymnasium) in Denmark. Special interests: Applied mathematics, graphics and popularizing Mathematics.

MaplePrimes Activity


These are replies submitted by erik10

Hi Alejandro

You saved me!! Your suggestion made me look for the installation log file in the C:\Programs\Maple 15 folder. This log file revealed all of the installed files, as you mentioned. I did not touch the math fonts ESSTIX... and the MaplePi font, but I had deleted the Courant, Helonia and Thames font groups. Luckily I was able to recover them from the garbage can :) So along with all eight Lucida fonts, all font are now present. Thanks a lot!

Erik

Hi Alejandro

You saved me!! Your suggestion made me look for the installation log file in the C:\Programs\Maple 15 folder. This log file revealed all of the installed files, as you mentioned. I did not touch the math fonts ESSTIX... and the MaplePi font, but I had deleted the Courant, Helonia and Thames font groups. Luckily I was able to recover them from the garbage can :) So along with all eight Lucida fonts, all font are now present. Thanks a lot!

Erik

@acer I agree with you. Those numerical procedures need a limited interval to work inside. Maple choses the interval from -10 to 10 for the Roots command by default. It does not mean it is the most appropriate - it just need to choose one! Unfortunately it is impossible to tell which interval is the best in a specific situation, without doing an in-depth analysis of the function involved. We have just experienced above that choosing a bigger interval might result in fewer zeros found. Quite possible it might even happen that reducing the interval (still containing the true zeros) will result in fewer zeros found. All this just emphasize the troubles when dealing with equations - even with one variable only! Let someone describe a procedure to find all zeros of any (continous) function in a given limited interval. Then probably one will be able to find a function sufficiently weird, which will fail. I won't be the one to find it, though ;)

Maybe the methods will work better (but not perfect) in average for equations associated with a differentiable function. I studied some Numerical Analysis at UCLA, Los Angeles, but it is 20 years ago ...

You are right that it could be valuable to point out the numerical problems - using an example - to even High School students, so they will realize they cannot always just press a button and expect to get all solutions of any equation in a second! It will give some insight into the subject.

Regards,

Erik

@acer I agree with you. Those numerical procedures need a limited interval to work inside. Maple choses the interval from -10 to 10 for the Roots command by default. It does not mean it is the most appropriate - it just need to choose one! Unfortunately it is impossible to tell which interval is the best in a specific situation, without doing an in-depth analysis of the function involved. We have just experienced above that choosing a bigger interval might result in fewer zeros found. Quite possible it might even happen that reducing the interval (still containing the true zeros) will result in fewer zeros found. All this just emphasize the troubles when dealing with equations - even with one variable only! Let someone describe a procedure to find all zeros of any (continous) function in a given limited interval. Then probably one will be able to find a function sufficiently weird, which will fail. I won't be the one to find it, though ;)

Maybe the methods will work better (but not perfect) in average for equations associated with a differentiable function. I studied some Numerical Analysis at UCLA, Los Angeles, but it is 20 years ago ...

You are right that it could be valuable to point out the numerical problems - using an example - to even High School students, so they will realize they cannot always just press a button and expect to get all solutions of any equation in a second! It will give some insight into the subject.

Regards,

Erik

@acer Thanks for your further investigations. The maxdistance option in the NextZero command is interesting. And thanks for the revised procedure. Maybe your procedure will even do a better job than the Roots command implemented by Maple itself? Execution time can be long, though, if a large interval is chosen.

I am completely aware that my suggestion to visually inspect plots isn't foolproof. Some zeros might still be overlooked. Unfortunately a mechanical way to find all zeros for any kind of function probably doesn't exist.Only an analytical examination of the function at hand will be able to rule out the presence of more zeros. For High School students, who don't have this analytical capacity, it might however be a good guide to look at plots in order to hopefully find all zeros.  

NB! I liked your description on how you found improvements in the code during a long drive. Such long periods of boredom can sometimes help the mental activity :)

Regards,

Erik

@acer Thanks for your further investigations. The maxdistance option in the NextZero command is interesting. And thanks for the revised procedure. Maybe your procedure will even do a better job than the Roots command implemented by Maple itself? Execution time can be long, though, if a large interval is chosen.

I am completely aware that my suggestion to visually inspect plots isn't foolproof. Some zeros might still be overlooked. Unfortunately a mechanical way to find all zeros for any kind of function probably doesn't exist.Only an analytical examination of the function at hand will be able to rule out the presence of more zeros. For High School students, who don't have this analytical capacity, it might however be a good guide to look at plots in order to hopefully find all zeros.  

NB! I liked your description on how you found improvements in the code during a long drive. Such long periods of boredom can sometimes help the mental activity :)

Regards,

Erik

Hi Christopher

The help pages say that if no range is provided with the numeric option, the range -10 to 10 is chosen by default, so we were just plain lucky there :)

But you are right that it is odd that Maple find less solutions in a bigger interval. I guess Maple choses some fixed number of points to apply the fsolve command to keep the amount of computation limited, in order to deliver the result within a reasonable timeframe. A bigger interval then means larger distance between the points, which can easily have an influence on the number of roots found - the output of the fsolve command depend on the initial value ... This is just a guess. I don't know if the Roots command is implemented in this way. It could explain the mystery at least.

Erik    

Hi Christopher

The help pages say that if no range is provided with the numeric option, the range -10 to 10 is chosen by default, so we were just plain lucky there :)

But you are right that it is odd that Maple find less solutions in a bigger interval. I guess Maple choses some fixed number of points to apply the fsolve command to keep the amount of computation limited, in order to deliver the result within a reasonable timeframe. A bigger interval then means larger distance between the points, which can easily have an influence on the number of roots found - the output of the fsolve command depend on the initial value ... This is just a guess. I don't know if the Roots command is implemented in this way. It could explain the mystery at least.

Erik    

Thanks Acer for your investigations. I appriciate them. The NextZero command is interesting. It suggest a way to "pick up" the solutions one after the other from left to right. Unfortunately this built-in Maple command does not even succeed in the current example.

RootFinding[NextZero](x -> x^3-3*2^x+3,-1000)

will give a FAIL as result. If the starting point is -100 NextZero will find a solution. 

I tested your nice findroots procedure on the very nasty example f := x-> sin(1/x)-x, having infinitely many solutions in any open interval around 0, and compared it to how the Roots command from the student package performed. It turns out the results depend a lot on the interval chosen:

Interval -100 to 100:
findroots: No solution
Roots: 5 solutions

Interval -10 to 10:
findroots: 50 solutions
Roots: 7 solutions

Interval -0.1 to 0.1:
findroots: 50 solutions
Roots: 50 solutions

So none of them win :)

I guess whatever method we use, we should not rely solely on the Maple output. One will need to look at a plot too!

NB! When I write Maple code in this forum, I have been uploading screen shots most of the time. Obviously that is not a nice way to do it. I tried using the Maple Math button in this forum and copy & pasted a section from my Maple document into it, but it didn't work. How do you do? :) I use Math 2D notation!

Regards,

Erik 

Thanks Acer for your investigations. I appriciate them. The NextZero command is interesting. It suggest a way to "pick up" the solutions one after the other from left to right. Unfortunately this built-in Maple command does not even succeed in the current example.

RootFinding[NextZero](x -> x^3-3*2^x+3,-1000)

will give a FAIL as result. If the starting point is -100 NextZero will find a solution. 

I tested your nice findroots procedure on the very nasty example f := x-> sin(1/x)-x, having infinitely many solutions in any open interval around 0, and compared it to how the Roots command from the student package performed. It turns out the results depend a lot on the interval chosen:

Interval -100 to 100:
findroots: No solution
Roots: 5 solutions

Interval -10 to 10:
findroots: 50 solutions
Roots: 7 solutions

Interval -0.1 to 0.1:
findroots: 50 solutions
Roots: 50 solutions

So none of them win :)

I guess whatever method we use, we should not rely solely on the Maple output. One will need to look at a plot too!

NB! When I write Maple code in this forum, I have been uploading screen shots most of the time. Obviously that is not a nice way to do it. I tried using the Maple Math button in this forum and copy & pasted a section from my Maple document into it, but it didn't work. How do you do? :) I use Math 2D notation!

Regards,

Erik 

Axel Vogt:
Thanks for your suggestion. I think however that the commands necessary are too involved and not suited for High School students. I will remember the RootFinding possibility for my own sake, though.

Markiyan:
Thanks for your reply. I was surprised to see that it makes a difference, which interval to look for solutions. When choosing the big interval from -1000 to 1000, one solution was missing, whereas the interval from -20 to 20 made Maple find all four solutions. I assume the reason for this apparently strange situation is that Maple needs to cut down on calculations in order to be able to find the solutions in a decent time ...

Conclusion:
As I can see, the best way to tell the students how to find numeric solutions to a given equation in one variable is the following: Plot the graph of the associated function in a resonable large interval. Look for zeros. If they are concentrated in a much smaller interval, plot the function in that smaller interval, until it is possible to point out approximative values of all zeros by simple inspection. Now use the fsolve command to find one zero a time, using the approximate values as a first guess. Alternatively the Roots command can be used to find all zeros. If this command deliver the same number of zeros as registered on the plot, those are all the solutions to the original equation. Of course there is still a possibility that there might be a solution outside the large interval, though ... 

Any comments to this procedure will be appreciated.

Erik

 

Thanks for your reply, Georgios. I think however that you misunderstood my question. I don't understand why the Units are not being simplified automatically when the Units[Standard] package is called. This is the whole reason why I am using this package, so I will not need to simplify again and again. But is doesn't work when equations are being solved, only when expressions are being computed!

Erik

Thanks for your reply, Georgios. I think however that you misunderstood my question. I don't understand why the Units are not being simplified automatically when the Units[Standard] package is called. This is the whole reason why I am using this package, so I will not need to simplify again and again. But is doesn't work when equations are being solved, only when expressions are being computed!

Erik

Great! This eval function made the trick. I didn't really understand the idea behind the ball procedure - just took it from the help page. I figure that when plotting and animating a function defined by a procedure, there should be a delay in evaluation (see http://www.maplesoft.com/support/help/errors/view.aspx?path=Error,%20(in%20f)%20cannot%20determine%20if%20this%20expression%20is%20true%20or%20false%3A%205%20%3C%20t) but when calling the ball procedure, an immediate evaluation of f(t) is necessary.

Erik

Great! This eval function made the trick. I didn't really understand the idea behind the ball procedure - just took it from the help page. I figure that when plotting and animating a function defined by a procedure, there should be a delay in evaluation (see http://www.maplesoft.com/support/help/errors/view.aspx?path=Error,%20(in%20f)%20cannot%20determine%20if%20this%20expression%20is%20true%20or%20false%3A%205%20%3C%20t) but when calling the ball procedure, an immediate evaluation of f(t) is necessary.

Erik

First 11 12 13 14 15 16 17 Page 13 of 17