Use of unassigned parameters in Mathcad

1.7k Views Asked by At

I want to define a function with parameters and make calculations with it so that the resulting equations contain my parameters and are not calculated based on the pre-defined values of parameters.

Consider I have some function with 2 parameters (a,b) in a Mathcad document.

When I type something like:

$$f(t):=at^2+bt+5$$

I get an error claiming that variable a is undefined. When I use $\rightarrow$ transformation in the same statement I see something like:

$$f(t):=at^2+bt+5 \rightarrow at^2+bt+5 $$ which looks like a duplication of my statement (I anticipate some mistake here) but generates no error.

When I then do calculations with $f(t)$, for example to get $f(1)$, I get the proper parameteric equations like: $$f(1)=a+b+5$$ - AND THIS IS WHAT I REALLY WANT AS A RESULT.

If I define some values for $a:=10$ and $b:=20$ before declaration of $f(t)$, I get $f(1)$ calculated with that values: $$f(1)=35$$ - WHICH IS NOT A RESULT I WANT, but in such case I get no error when I don't use $\rightarrow$ in $f(t)$ declaration!

Am I doing these operations right or is there some other way to define parameters before declaring $f(t)$ formula to get PARAMETER-based calculations for $f(1)$ and do not using $\rightarrow$ transformation in $f(t)$ statement?