Ask Your Question
1

Set a REAL function in SAGE

asked 2019-03-17 22:31:18 -0500

Karim gravatar image

updated 2019-03-18 01:19:33 -0500

vdelecroix gravatar image

Hello everyone,

I have a problem when I was trying to set my function H(t) as real.

image description

H = function('H')(t)
H.is_real()

=> False

conjugate(H)

=> \bar{H}

I wanna set my function in real space and the code stop printing \bar{H] as you seen in the screen shot.

Thanks for the help. Cheers.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-03-18 13:16:58 -0500

rburing gravatar image

A simple alternative to 'setting it to be real' is to make a substitution such as this one:

whatever.subs({conjugate(H) : H, real_part(H) : H, imag_part(H) : 0})

It depends on what kind of expressions you want to get rid of.

edit flag offensive delete link more
0

answered 2019-03-18 08:37:59 -0500

Emmanuel Charpentier gravatar image

This appears to be unsupported in either Sage or Maxima. Implementing this seems to be no small beer.

You may try to discuss this on sage-devel...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-17 22:31:18 -0500

Seen: 45 times

Last updated: Mar 18