Ask Your Question

SAGETEX: Howto compute solution of a function

asked 2013-04-22 12:50:37 +0200

reb_reb gravatar image

updated 2013-04-22 12:53:09 +0200


how can i display the solution of the following function with sagetex?

\title{Vordimensionierung Hallentragwerk}


lambda_z = 5
s_ka = 4
loesung (lambda_z, s_k) = lambda_z * s_k

$ \sage {loesung }$

Sincerely reb_reb

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-04-22 14:04:57 +0200

First, what do you want to solve? It's a function, not an equation. Do you want to solve loesung(lambda_z, s_k) = 0? Do you want to compute loesung(5, 4)? Second, I believe that the line defining loesung will overwrite the previous definition of lambda_z, making it a symbolic variable instead of just being 5.

So perhaps:


lambda_za = 5  # note the 'a' at the end
s_ka = 4
loesung (lambda_z, s_k) = lambda_z * s_k

$ \sage {loesung }$

This will print out 20:    
$ \sage {loesung(lambda_za, s_ka) }$
edit flag offensive delete link more

answered 2013-04-22 18:08:42 +0200

reb_reb gravatar image

Thank you, that was helpful.

To finalize my project one last question: How can I display the values of the variables in the function?

Like: f(lambda_z, s_k) = lambda_z * s_k = 5 * 4 = 20

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


Asked: 2013-04-22 12:50:37 +0200

Seen: 635 times

Last updated: Apr 22 '13