# Question:How can I evaluate procedure J2?

## Question:How can I evaluate procedure J2?

Maple

Why does the execution of procedure J2 in the attached file fire an error?
it looked to me as if I had built it the same way as J1.

 > restart:
 > # Basically I want do do something like that, J1 := proc()   local z:   z := proc(u) fsolve(sqrt(x)=u, x) end proc:   evalf(Int(''z''(u), u=0..1)) end proc: J1();
 (1)
 > # but when z is more complex finction of two arguments. # # Unfortunately a direct transposition of what worked above no longer works. J2 := proc()   local z:    z := proc(q1, q2)      exp(        2*(          fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = q1, x)          *          fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = q2, x)        )        -        fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = sqrt(q1), x)^2        -        fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = sqrt(q2), x)^2     )   end proc:   evalf(Int(''z''(q1, q2), q1=0..1, q2=0..1)) end proc: J2();
 >

Download integration_issue.mw

Can you help me fix this issue?

Thanks in advance

﻿