but integrals do work on vectors, it just didnt worked in this particular
case.

i also face this problem when trying to do integral on each axis, for
example:

x = var('x')
f = -(x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 +
1)^2)/sqrt((x - 1)^2 + 1)
integrate(f, x)

output:
-integrate((x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 +
1)^2)/sqrt((x - 1)^2 + 1), x)


though it does works if i try to do:

-integrate((x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 +
1)^2)/sqrt((x - 1)^2 + 1), x)

output:
1/sqrt((x - 1)^2 + 1)

maybe copy and paste that does the job, but then i cant run scripts,
and i also want it to work straight on vectors.


пн, 25 окт. 2021 г. в 17:58, Nils Bruin <nbr...@sfu.ca>:

> I don't think the integration backends or sage itself deal with integrals
> of vector-valued functions. You can try to integrate each coordinate
> individually: integrals of vector-valued functions are generally defined to
> be the vector of integrals of each coordinate function. There will still be
> integrands that won't be handled because an antiderivative can't be
> found/expressed. In those cases you can probably get an answer through
> numerical integration, for which you'd still do the problem component-wise
> if you use general-purpose tools.
>
> On Monday, 25 October 2021 at 01:17:51 UTC-7 zfrh...@gmail.com wrote:
>
>> hello, im trying to do the next integral on a vector:
>> L_1,L_2 = var('L_1,L_2')
>> f_2 = vector((-(((L_1 - L_2)^2/((L_1 - L_2)^2 + 1) - 1)^2 + (L_1 -
>> L_2)^2/((L_1 - L_2)^2 + 1)^2)*(L_1 - L_2)/((L_1 - L_2)^2 + 1)^(3/2), (((L_1
>> - L_2)^2/((L_1 - L_2)^2 + 1) - 1)^2 + (L_1 - L_2)^2/((L_1 - L_2)^2 +
>> 1)^2)/((L_1 - L_2)^2 + 1)^(3/2), 0))
>> f_2.integral(L_2,0,1).integral(L_1,0,1)
>>
>> but im getting the next output:
>> (-integrate(integrate((((L_1 - L_2)^2/((L_1 - L_2)^2 + 1) - 1)^2 + (L_1 -
>> L_2)^2/((L_1 - L_2)^2 + 1)^2)*(L_1 - L_2)/((L_1 - L_2)^2 + 1)^(3/2), L_2,
>> 0, 1), L_1, 0, 1), -1/6*sqrt(2)*(sqrt(2) - 3) + 1/2*sqrt(2) - 1/3, 0)
>>
>> how can i do so it wouldnt type "integrate(...)" and just do the integral
>> itself?
>> and is that considered as a bug?
>> im using sage 9.2 python 3.7.7
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-devel/8t-bKeAbYXk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/b48a9d01-3f6d-431c-93ee-9ed94dcb0c6dn%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/b48a9d01-3f6d-431c-93ee-9ed94dcb0c6dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAHBzMo5haWfUTGUnJRYpDpQ-3MWZFA26nSSygQN7hqD_4Ug6dw%40mail.gmail.com.

Reply via email to