27    
28function [f,df] = f_and_df(a,b,n)
29% Our function is f=a^n-b and it's derivative is n*a^(n-1).
30
31    f  = a^n-b;
32    df = n*a^(n-1);