# Can I use Manipulate[expr ] to plot AND calculate simultaneously?

Posted 8 years ago
2556 Views
|
|
0 Total Likes
|
 Hi,I have multiple functions of $x$ that depend on specific parameters, say $f(x,a,b,c)$, $g(x,a,b,d)$, $h(x,b,c,d)$. I can plot these functions simultaneously and use Manipulate[] to set the range for the parameters $a,b,c,d,..$ etc., and look at how the functions behave simultaneously under a change in parameters (using the slide-bar). That's very neat. Then, I was interested in seeing the difference between, say, $g$ and $h$, so I plotted Abs[g[x,a,b,d]-h[x,b,c,d]]. Let's call that function $y(x,a,b,c,d)$.All these functions are plotted on a certain domain ( $x$ from $0$ to $\pi$) and I would like to calculate $\int_{0}^{\pi}y(x,a,b,c,d) dx$. Given a set of parameters that I fix (say $a=1,b=1,c=1,d=1$), I should get a scalar output. But I would like to see this output at the same time I vary each slidebar in the Manipulate output. In other words, I want to be able to play with the parameters and see the plot change accordingly, and at the same time, see how the result of my definite integral varies. Is there a way to do this with Manipulate? If so, how?I have tried to look in the documentation but there doesn't seem to be any way of manipulating multiple "tasks" at the same time. Thanks in advance!