Your second arg is being interpreted as a flag for the `integrate` routine. 
You should not be telling it the integration variable via second arg when 
you have a limits:

```python
integrate(y,x) -> x*sqrt(1 - x**2)/2 + asin(x)/2
integrate(y,(x,1) -> pi/4
integrate(y,(x,0,1)) -> pi/4
```

/c
On Tuesday, April 23, 2024 at 2:48:38 PM UTC-5 [email protected] wrote:

> This code:
>
>  
>
> import sympy as sm
>
> x = sm.symbols('x')   
>
> f = sm.integrate(sm.sqrt(1-x**2), (x, 0, 1))
>
> print('f=', f)
>
>  
>
> gives:
>
> f = pi /4
>
>  
>
> *From:* [email protected] <[email protected]> *On Behalf Of *Ajith 
> Kumar
> *Sent:* Dienstag, 23. April 2024 10:43
> *To:* sympy <[email protected]>
> *Subject:* [sympy] Area of circle by integration
>
>  
>
>  
>
> from sympy import *
>
> x,y = symbols('x y')
> y = sqrt(1 - x**2)
>
> integrate(y,x ,(x, 0, 1)).evalf()
>
>  
>
> result is
>
> 0.452064830064115
>
>  
>
> I expected  value of Pi/4, by integrating a quarter of a circle with unit 
> radius. Can anyone explain the reason, I am new to Simpy.
>
>  
>
> Regards
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/4bfbada5-0317-4272-a854-169e3ae6903cn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sympy/4bfbada5-0317-4272-a854-169e3ae6903cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/eaec3401-aeb5-455f-b175-36b56118cd03n%40googlegroups.com.

Reply via email to