How to Type this type of equation?

Things I have tried

What I’m trying to do

I was using obsidian to make my math notes and while studying continuity i wanted to type a system of equations
how can i do the above?

f(x) =
  x, & \text{if $x \leq 1$} \\
  5, & \text{if $x > 1$}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.