## 20 Reputation

15 years, 29 days

## Sorry, I have missunderstood...

Sorry, I have missunderstood (U[1], U[2])...

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Ok... I would like to know...

Ok... I would like to know if the range of Y[1] and Y[2] are, actually, 0 and 1.

Well, if you want to plot the curve (U[1], U[2]), you can do it as follows in the maple worksheet I just uploaded. Maybe it is not the easier way, but I use the curve command (plottools package).

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Are you trying to plot the...

Are you trying to plot the curve (U[1], U[2]) or to plot the two functions separatley?

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Suggestion...

Wouldn't be nice if you write a procedure wich computes your sum and the contribution of each term in your sum? If you do so, you might ask to stop the sum when i reaches a appreciable precision, wich, actually, could be argument of your procedure.

Try something like...

soma := proc(p, a, b)
global Z:
local somatorio, i, err:

err := p + 1:
somatorio := 0:
for i from 1 by 1 while err > p do
err := i*Z(i, a, b)
somatorio := somatorio + err:
end do:

return(somatorio)
end proc:

It seems everything is all right...

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

This seems to be funny, it's a complicated function, isn't it?

Well... What is your definition of mean value? If Z(x, a, b) is a probability of the random variable x, I think the first step is to define the range of your x variable. If it is the case, then you will have to sum over all the values of x the product x Z(x, a, b)... But it depends on what the function Z is, etc.

The thing is, I can not help you only with this information. Could you explain in more details or define what a "mean value" is for you?

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Just something...

Are you trying to compute the integral of Z(x, A, B), with x real? There isn't a problem with the product?

Anyway... Try Z(0, 0.37, 0.35) and it returns the same error ("too many levels of recursion"). The same for any real number.

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Hi...

Hi... Is this a definite integral? Are you sure this is the expression?

sqrt((2(p_1-x))/((D_r^4/D_e^4-1)*rho))

(I have replaced p_0 by x)

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## I am sure there is some very...

I am sure there is some very cool method so you can display r*cos(theta) as x, but I use the subs statement. Take a look on ?subs and ?algsubs pages. But I will look for a clever method...

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

I'm sorry... The statement I suggest you not to use is "alias", not "declare". If you don't use declare, things don't work. I'll change this in my worsheet just soon...

Thanks!

PS - Actually... I don't know how to update a file in my file box... Or changing it... anyway... Where can I learn this?

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Well......

For sure, this is not wrong. Actually, this can help you a lot. Anyway, when I'm working with my worksheets, I really get confused if I use aliases. Specially if you're a "newbie" with Maple (which may not be the truth), you may experience some problems with that.

Some of my friends, even those who are newbies, prefere to use it. But I know people who don't. It's a matter of preferences and maybe I shouldn't write that in the worksheet.

Anyway... Was that what you're looking for?

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Ok...

Please, take a look in the worksheet I just uploaded and tell me if this is near of what you need.

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## Lemme give a shot...

By "using maple to derive derivatives of implicit functions", you mean computing the gradient of f (your function) in r and theta coordinates?

If it is the case, it is not a difficult task and, maybe, I can help you. Otherwise, I think I didn't understand, hehe sorry.

-------------------------------------------------------------------------------------------
Thiago Schiavo Mosqueiro

[thiago.schiavo@gmail.com]
"God is real, unless declared integer"

## I was trying......

It seems to me that the procedure is quite right. Did you called like this?

> myproc(4, 1/3*Pi, 10, 2);

Just to be sure: the "pi" value is, in Maple environment, the variable "Pi".

 Page 1 of 1
﻿