Question: Evaluating expressions inside an Explore command

Dear Maple users

Let's say I want to plot a line containing a parameter, for example (a+2)*x+6, where a is the parameter. When using the following Explore command:

Explore(plot((a+2)*x+6, x = -5 .. 5, view = -10 .. 10), parameters = [a = -4.0 .. 3], initialvalues = [a = 1])

I will be able to change the value of a by using the slider. The actual value of a is currently displayed as well. Now, However, I want to have the current value of the slope of the line displayed as I move the slider. How is this done? When using a print command inside the Explore command the value of a+2 is not displayed, rather "a+2". Can I use some kind of component?

I hope someone can help. 

NB! I constructed this rather doll example, just to make it simple.

Regards, Erik

 

Please Wait...