First, though domain names aren't expensive per se, you DO have to host the second one somewhere. And you can't stop hosting the first one because that's where you redirect from.
Now, there's a perfectly good way around this assuming your host is flexible. Some hosts (mine for example) allow one to "park" other domains free. So if this were me, I would buy "domainname2.com", transfer my hosting account from domainname1 to domainname2 (which my host would allow because she likes me - mostly because I pay my bills on time a year ahead, and I don't violate TOS EVER), "park" domainname1 to domainname2, and I wouldn't even have to do a redirect, because once "parked" the domain ALWAYS displays what's on the domain it's "parked" at.
Nice, hm?
Make sure you know ahead of time what "parked" means. Often, this may be a 302-Moved Temporarily redirect, or a page that simply frames the hosted site. Both can cause problems with search engines.
The method I prefer is to point both domain names to the same IP address, and then use server-side code to redirect the old domain to the new domain using a 301-Moved Permanently redirect. The exact method depends on your server's 'user' capabilities, and to some extent, your own preferences.
Jim
[Edit - y'know, I was just "re-looking" after I submitted this, and realized that I hadn't actually paid attention to the page address of the page displayed after you click on a link from the parked page. And it's a good thing I went back and looked again, because what REALLY happens is that www.example.com (parked at www.mainsite.com) shows the main site index page, and when you click on the links, the address bar etc. shows www.example.com/page1.html and so on. Which is NOT what I thought was happening, what I posted above, OR what my own host explained would happen when I asked her! *shrug* Sorry!]