Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Define a function with different cases

I'm working with a function whose functional form is different at a specific value of the parameter (a=1):

 if a==1:

Is it possible to define once and for all a function U(x,L,a) which includes the parameter as a variable so that I don't need to redefine it when a = 1?