Dear Vince,

Thank you for your helpful reply.

I'm trying to do something similar to check whether a function is periodic, 
I tried:
> bool(sin(x) == sin(x + 2*pi))
which gave 'True' as 2*pi is the period of sine. 

However, I wanted to figure out what is the period of the function, so I 
tried:
> var('p')
> solve(sin(x) == sin(x + p), p)
I though this would give me 2*pi (and I guess it should also give 4*pi, 
6*pi, etc.) but it gave me:

[p == -x + arcsin(sin(x))]
Am I doing something wrong?

Regards, and thanks,
Avril


On Saturday, October 12, 2013 11:08:18 AM UTC+1, Vincent Knight wrote:
>
> Hi Avril,
>
> One approach to check parity for example could be:
>
> sage: f(x) = 1/(1-x^2)
> sage: bool(f(x) == f(-x))
> True
>
> whereas f is not odd as:
>
> sage: bool(f(x) == -f(-x))
> False
>
> There might well be an attribute, method on functions that does this also 
> but I'm not aware of it.
> Vince
>
>
> On 12 October 2013 11:03, Avril Coghlan <[email protected] <javascript:>
> > wrote:
>
>> Dear all,
>>
>> I'm wondering whether there is a way to use SAGE to test whether a 
>> function such as:
>> f(x) = 1/(1 - x^2)
>> or
>> f(x) = sin(x)
>> is an odd function, even function, or periodic? 
>>
>> I'm a Maths student, and am not sure if this is possible, or is a silly 
>> question (it seems to me quite a hard thing to check, but I could be 
>> totally wrong),
>>
>> Regards,
>> Avril
>> Avril Coghlan
>>
>>  -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Dr Vincent Knight
> Cardiff School of Mathematics
> Senghennydd Road,
> Cardiff
> CF24 4AG
> (+44) 29 2087 5548
> www.vincent-knight.com
> +Vincent Knight
> @drvinceknight
> Skype: drvinceknight 
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to