echo on

% Problem 3
clear
close all

% a)

% We first declare x and y to be symbolic with the syms command, and then 
% apply factor.

syms x y
factor(x^3 - y^3)

% This is easily checked by multiplying out the factored form.

% b) 

% We can apply factor directly to the given integer.

factor(123456789)

% We see that the prime factorization of 123456789 is 3^2*3607*3803.

echo off
