I'm sorry , I meant to write x1=0, x2=10. It gives Eq(Piecewise(((5 + b/(4*a))*sqrt(400*a**2 + 40*a*b + b**2 + 1) - log(4*a*b + 4*sqrt(b**2 + 1)*sqrt(a**2))/(4*sqrt(a**2)) + log(80*a**2 + 4*a*b + 4*sqrt(400*a**2 + 40*a*b + b**2 + 1)*sqrt(a**2))/(4*sqrt(a**2)) - b*sqrt(b**2 + 1)/(4*a), ((a > -oo) & (a < oo) & Ne(a, 0)) | (Ne(a**2, 0) & Ne(a*b, 0))), (-(b**2 + 1)**(3/2)/(6*a*b) + (40*a*b + b**2 + 1)**(3/2)/(6*a*b), Ne(a*b, 0)), (10*sqrt(b**2 + 1), True)), 20)
but the solution I got is empty i.e. [ ] Thanks Shishir Kushwaha On Sunday 26 May 2024 at 06:58:37 UTC+5:30 asme...@gmail.com wrote: > With x1 = x2 = 0, arc_length_expr is equal to 0, meaning your eq3 is > invalid. You can see this if you print eq3. It gets set to False, > because it is 0 = 10. > > Aaron Meurer > > On Sat, May 25, 2024 at 5:26 PM Shishir Kushwaha > <kushwahas...@gmail.com> wrote: > > > > In the following piece of code I am unable to get the values of a,b and > c after solving them. > > Is there a different way to solve it and what am i doing wrong. Take x1 > = 0 , y1=10, x2=0, y2=10, length = 20. > > > > def get_lowest_point(self): > > a, b, c, x = symbols('a b c x') > > > > x1, y1 = self._left_support > > x2, y2 = self._right_support > > length = self._length > > > > eq1 = Eq(a * x1**2 + b * x1 + c, y1) > > eq2 = Eq(a * x2**2 + b * x2 + c, y2) > > arc_length_expr = integrate(sqrt(1 + (2 * a * x + b)**2), > > (x, x1, x2)) > > eq3 = Eq(arc_length_expr, length) > > solution = solve((eq1, eq2, eq3), (a, b, c)) > > > > # Print the solution to debug > > print("Solution:", solution) > > > > return solution > > > > -- > > 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 sympy+un...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/6f9f85cf-e010-443a-9a5c-b03a359e1132n%40googlegroups.com > . > -- 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/2fafa12f-c2f2-423e-b6ae-d59ff772dad1n%40googlegroups.com.