These are mixed up all the time by students. Maybe it's because わざわざ is just so fun to say?
せっかく shows something that is done through great trouble or time to reach a certain point or condition. It is an adverbial noun, so it is possible for it to act as a noun. Again, there is some sort of big cost implied, and it is that cost being put into good use that's being insisted on.
There are several grammatical environments that せっかく can be used in.
These are simply applications of せっかく with other patterns. Of course, you should always be aware of how polite you should be to someone.
Examples
1. せっかく日本語を習ったんだから、日本語をぺらぺらと話すことができるようになりたいです。
Since I've taken the trouble to study Japanese, I want to become able to speak Japanese fluently.
Nuance Note: んだから implies that the person you're speaking to is well aware of your Japanese skills.
2. せっかくの苦労も仇になった。
All my troubles have been done for nothing.
3. せっかくの苦労が水の泡になった。
All my pains were in vain.
4. せっかくのご厚意ですから、お受けしましょう。
For your great kindness, I accept.
5. せっかく習った日本語は忘れないようにしましょう。
Please try not to forget Japanese, which you've taken the trouble to learn.
6. せっかく日本へ行っても、日本人と話さないと、日本語は上手になりません。
Even if you make the efforts to go to Japan, if you don't speak with Japanese people, your Japanese won't get better.
7. せっかくアメリカへ来たんだから、しばらく滞在してください。
Since you've gone through the trouble to come to America, please stay for a while.
8. せっかくエッセイを書いたのに、文が全部消えてしまったよ。
Although I spent so much energy writing my essay, it got completely erased!
9. せっかくやれるなら、やってほしいんだが。 (失礼な言い方)
If you could do it, I'd like you to, but...
Orthography Note: せっかく can be written in 漢字 as 折角 or 切角
せっかく VS わざわざ
せっかく gives a feeling that something should not be wasted because one has put a lot of effort into it. It can be used as a nominal, and it is often used in refusing a request. わざわざ, on the other hand, can only be used as an adverb and describes that there was no necessity to go through the trouble. It is often used out of care for a person.
10. お忙しいところをわざわざ来ていただいて、すみません。
I'm sorry for having you come all the way while you're busy.
11. 焼き肉を食べにわざわざ北見市まで行きました。
I went all the way to Kitami to eat yakiniku.
12. せっかくですがお構いなく。
Thank you, but don't trouble.
13. せっかく作ったんですから、食べてみてください。
Since I went through the trouble to make it, please try to eat it.
14. わざわざ取りに帰らなくてもいいですよ。
It's alright for you to not go all the way home to get it.
15. せっかくの休みなのに、仕事をしなけりゃいけないさ。(すごく砕けた言い方)
Although it's a long-awaited holiday, I have to work.
16a. 多忙なところをわざわざお越し頂きありがとうございました。(もっと自然)
16b. 多忙なところを押して来てもらってありがとうございました。
Thank you very much for coming for me although you are quite busy.