Question: How Do I Write A Regula Falsi Program In Maple?

I Could Not Write An If Then Or Ifelse Statement. Please Help Me.

f := unapply(x^2-2, x); a := 1; b := 2; n := 10; Digits := 10;
      2    
x -> x  - 2
                               1
                               2
                               10
                               10
c := evalf(eval((a*f(b)-b*f(a))/(f(b)-f(a))));
                          1.333333333
if  f(c)*f(a)<0 then ;
          "      k:=evalf(eval(|(f(c))/(b-c)|)) and "

                          /(1 + k) a f(b) - b f(a)\
             x[i] := evalf|-----------------------|
                          \  (1 + k) f(b) - f(a)  /
            "     elif f(x[i])*f(a)<0 then b:=x[i]"
                 "     else b:=c and a:=x[i] "
                  "     if f(c)*f(a)>0 then "
                 "      k:=|(f(c))/(b-c)|and "

                          /a f(b) - b f(a) (1 + k)\
             x[i] := evalf|-----------------------|
                          \  f(b) - f(a) (1 + k)  /
            "     elif f(x[i])*f(a)>0 then a:=x[i]"
              "     else a:=c and b:=x[i] end if"

Error, unterminated 'if' statement
     Typesetting:-mambiguous(Typesetting:-mambiguous(

       if fApplyFunction(c)sdotfApplyFunction(a)lt0 then , 

       Typesetting:-merror("unterminated 'if' statement")))

Please Wait...