There are some examples of 'arbitrary waveform generators' that use the RPi Pico (more correctly the RP2040). I've also written something like this myself.
In simple terms, knowing the sampling frequency, you create a buffer in memory, insert whatever values you want for the waveform and then pass them out via a GPIO port (or pins) into some form a DAC.
You can use whatever equations you like to generate the samples, adding however many frequencies you like. The only thing to watch is the buffer needs to be long enough so that the waveform is continuous when you cycle from the end of the buffer back to the beginning.
I used DMA to move the samples from the buffer to the PIO that did a little manipulation and put the values on the GPIO pins. I also used a R-2R ladder as the DAC (no timing required) and then a small buffer op-amp.
In my case I programmed sine, square (more exactly a frequency with a variable mark-space ratio and the ability to slope the sides that could make a saw-tooth or triangle wave etc.), sinc, gaussian and random noise waveforms. I also had a simple AM and FM modulation system, 35kHz to 45kHz (default but variable) sweep oscillator (for testing ultrasonic filters) and finally an ECG simulator (using either a simulated ECG or a measured sample of one of my heartbeats).
You can use this principle for just about any 'arbitrary' waveform you want, just remembering the sample rate and value range can be a little limiting (I used 8-bit samples, and with a 64-sample buffer could get about 3MHz sine wave from my arrangement, the FM could only give me a 1kHz modulation a 1MHz carrier).
Susan