Martin,
Here is a slightly round-a-bout way to achieve what I think you want:
(1) -> a1:=integrate(x*sin(1/x), x=0..1)
(1) "failed"
Type: Union(fail: failed,...)
(2) -> a2:=integrate(x*sin(1/x), x)
x
++ 1
(2) | %A sin(--)d%A
++ %A
Type: Union(Expression(Integer),...)
(3) -> domainOf(a1::Any)
(3) failed
Type: OutputForm
(4) -> domainOf(a2::Any)
(4) Expression(Integer())
Type: OutputForm
(5) ->
--
sage: a1=fricas('integrate(x*sin(1/x), x=0..1)')
sage: a2=fricas('integrate(x*sin(1/x), x)')
sage: fricas("domainOf(%s::Any)"%a1.name())
failed
sage: fricas("domainOf(%s::Any)"%a2.name())
Expression(Integer())
--
The "trick" involves the 'Any' domain. Some people here seem to think
that 'Any' should be avoided but I think it is really rather clever
and has an important place in FriCAS. This sort of "duck typing" is
quite common in Java.
Bill Page.
On 15 August 2016 at 10:09, 'Martin R' via FriCAS - computer algebra
system <[email protected]> wrote:
>
>
> Am Montag, 15. August 2016 13:56:14 UTC+2 schrieb Bill Page:
>>
>> Why "Please excuse"? I think you are talking to people who want to
>> answer this questions (if possible).
>>
>
> OK, you are right :-) Thanks!
>
>>
>> This works for me:
>>
>> (3) -> a case fail
>>
>> (3) true
>> Type:
>> Boolean
>>
>> sage: a=fricas('integrate(x*sin(1/x), x=0..1)')
>> sage: fricas("%s case fail"%a.name())
>> true
>>
>> I hope that helps.
>>
>>
> It helps a little, but it would help more if I would not need to try all
> "case" statements...
>
> Martin
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" 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 https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" 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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.