I have a function I am trying to write that will do double integrals. I know you can do this in the scratchpad. However, I want to just learn to write programs so I really want to make my own program that does this.
So my function looks like this
"t=fucntion, a₀=lower limit, b₀=upper limit, m=variable we integrate with respect to "
Define LibPub doub_int(t,a₀,b₀,m)=
Prgm
expr("f(x,y):="&string(t))
fy(x,y):=∫(f(x,y),m,a₀,b₀)
Disp fy(x,y)
EndPrgm
When plugging in values doub_int(2x*y^2,1,x,y) (regardless of what I set "a₀" or "b₀" to) I get this every time
((−2*(a₀-b₀)*x^(2))/(a₀*b₀))-a₀^(2)+b₀^(2)
I also know the above is not the entire double integral process. I am just using the above to show how this is failing to pass values. Do I need to pass values using a pointer or something. Please anything could help.