y'=-y/(2*y^3-1)


maanantai 17. marraskuuta 2025 klo 18.21.42 UTC+2 [email protected] 
kirjoitti:

> On Mon, Nov 17, 2025 at 3:45 AM [email protected] <[email protected]> wrote:
>
>> According to the manual the following should work:
>>
>> t,y=var('t,y');
>> g= lambda t,y:-y/(2*y^3 - 1);
>> ra = ode_solver();
>> ra.function=g;
>> ra.ode_solve(y_0=1,t_span=[0,1],num_points=100)
>>
>
>
> Please write  the ODE you want to solve, in the usual maths notation -
> it's not clear what it is.
>
>  
>
>>
>> However, I get the error message
>>
>>
>> --------------------------------------------------------------------------- 
>> TypeError Traceback (most recent call last) 
>> /tmp/ipykernel_317/557462051.py in <module> ----> 1 ra.ode_solve(y_0=
>> Integer(1),t_span=[Integer(0),Integer(1)],num_points=Integer(100)) 
>> /usr/lib/python3/dist-packages/sage/calculus/ode.pyx in 
>> sage.calculus.ode.ode_solver.ode_solve 
>> (build/cythonized/sage/calculus/ode.c:5124)() 412 self.y_0 = y_0 413 --> 
>> 414 dim = len(self.y_0) 415 type = isinstance(self.function,ode_system) 
>> 416 if type == 0: TypeError: object of type 'sage.rings.integer.Integer' 
>> has no len() 
>>
>> Also 
>> def f(t,y): return -y/(2*y^3 - 1);
>> ra.function=f;
>>
>> gives the same error.
>>
>> ??
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/sage-support/d14332f8-44b6-4f93-9b42-0972926d2a16n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-support/d14332f8-44b6-4f93-9b42-0972926d2a16n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/48560c48-2cff-443b-94a4-30e071c6552en%40googlegroups.com.

Reply via email to