Keep these three things in mind when dealing with recursions;

  1. Where it stops(what is the target)?
  2. That and back.(What is the condition, what is the definition of one loop)
  3. Divide and conquer

Solving recursive pieacewise function

Recursion problem can be divided and solved in the following method;

  1. Simplify→Simplify calculations until the base case is reached
  2. Substitute→ Substitute the base case in last expression
  3. Solve→Solve the remaining expression until the last one is solved.

Piecewise function is a mathematical recursion which occurs at problem like this;

スクリーンショット 2025-03-15 8.39.39.png

It is a complex subject so I won’t explain it here, but you can find how to solve it by reading the following page: