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 <[email protected]> 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 [email protected]. > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6Jb6Mk%3DkYbwDBg%2BSvm-fRdAS9EW4PfJ%2BBE%3DF2n2N5Grag%40mail.gmail.com.
