Time Series prediction help

I wish to predict values for an arbitrary function. ( Like sinx + sin2x). I’ve searched a lot for tutorials but can find any that explains how to code up such a network in pytorch. I have a decent understanding of the concept behind RNNs and LSTMs.

If anyone can direct me to a place where a simple tutorial or lecture is available I’d greatly appreciate it.