I just finished a good two months trying to figure this out. Here is what I know:
Your 1uF Input Capacitor Explained) The larger capacitor on the left side of the LM317 or LM337 between the input voltage and ground is the filter capacitor that helps remove any input voltage "Ripple"that is coming from your power supply (could be AC Mains or, in your case, some DC Wall-Wart or Variable Lab Bench PSU) so that the input & output don't fluctuate at a level that your load cannot tolerate, or rather, the output doesn't pass any of the input ripple voltage voltage.
The filter capacitor is a low pass filter and it has to be pretty large depending on how large your input PSUs Output Ripple is (AC Mains that is rectified changes voltage continuosly so having a large Capacitor filter section keeps the Input of the Voltage Regulator constant, but during the portions of time when the AC waveform is below the Capacitors stored Voltage the load will discharge the capacitor and this is Ripple). If your getting your supply voltages from a Transformer, that is, stepping down the AC mains voltage you're going to need probably at least a 1000uF (I typically use 2200uF as they ar roughly the same size and the bigger the filter the better when Rectifying AC Mains to some constand DC) instead of 1uF (at a Voltage Rating that exceeds your Voltage Requirements; remember AC V-max is V-root-mean-squared/.707). I think your circuit is assuming that the input supply voltage is already DC and doesn't have much ripple voltage (due to the very low filter cap value of 1uF) so it doesn't need to filter that much and the FIlter cap in your case is simply for Ripple that may result from Transients or the very small (but non-zero) ripple coming from your DC PSU.
It basically keeps the input voltage at a constant value and you can calculate it using:
C=I*dT/dV(peak to peak ripple)
C=Filter Capacitance
I=Output Current Requires
dT=The difference in time between Maximum Voltage and Minimum Voltage (For Transforming and Rectifying AC Mains this amount can be calculated using the Look-Up Table I put at the bottom of this post, or use excel to make a LUT of Sin(2*PI()*T) and make T 1-360 so that you can see the angle at which the Capacitors Voltage equals the rising rectified AC voltage after the first half of the 50Hz AC Mains -Rectified the frequency becomes 100Hz).
This could be a tantalum capacitor in your circuit or you could use an electrolytic capacitor. I have never used to tantalum capacitor that hasn't exploded in my face so I wouldn't recommend that one and the aluminum electrolytic only explodes maybe .5% of the time so I do recommend that. Basically it just needs to be polarized (and polarized capacitors have the unique property of exploding when the polarity is reversed except Tantalum Caps Charge and Discharge almost instantly while Electrolytic Caps don't which is why the exploding capacitor occurs with Tantalum Caps more often). Tantalum capacitors take up about 5% as much space so I recommend using Tantalum if you know how to not make them explode and are low on PCB 'real-estate'. Tantalum is also a conflict material and harvested from mines in the Congo by child slaves unfortunately and due to that (and Tantalum's relative Scarcity) they are a wee-bit more expensive (but here is a link to a cheap kit of Tantalum Caps.
Example:
If your Regulator is Stepping 17V down to 15V and your % of Input Ripple Voltage is 10% then the Minimum Input Voltage subject to Ripple is 17V-1.7V (10% of 17V). Therefore your output should be Ripple free c. But the Datasheet for the LM317 says you should provide at least 3-Volts "Headroom between Input Voltage and Output Voltage because the Voltage Regulator is merely an Op-Amp with a Darlington NPN Transistor Pair Output and the Collector of the Darlington as well as the Voltage Reference of the Op-Amp and the Op-Amps +Vsupply pin are all connected to the Input and when it's ripple is 10% at 17-Volts that means it's lowest Vin will be 15.3-Volts and the Darlington is going to have SOME amount of Vce and the Reference for the Op-Amp is a buried band-gap voltage reference that is always 1.25 Volts below the Vin so at 15.3-Volts as your absolute minimum Vin you're going to have 'some' Input Ripple "passing" through the regulator and appearing on the output as Output ripple because your internal Op-Amps Vref (inside the LM317/337) is now 15.3-1.25=14.05. Therefore at it's minimum Vout is 14.05 Volts giving the output a % ripple of (15-14.05)=.95V/15V=6.33%, Conceivably. If your Vsupply had a 5% ripple then Vref would be (17*(100%-5%)=16.15>>16.15-1.25=14.9; therefore Output Ripple % with a 5% input Ripple when regulating 17V to 15V is (15-14.9)=.1/15=0.6% which is likely tolerable. Also % Ripple is dependent on whatever the Capacitor Voltage is as it's Equation is (Vmax-Vmin)/Vmax, but the Ripple Voltage is not; if you have a DC offset of 5 Volts then the Ripple voltage at 10% is stil 1.7 Volts but the Ripple % is 1.7/(17+5)=7.7% instead of 10%.
Here are some links to various Tantalum 100 PC Kits; never under less than .47uF or higher than 100uF:
eBay
Amazon
Amazon
BanGGood by far cheapest and free shipping)
High Valued Electros
eBay ($1 each)
eBay ($3 for 50pcs 100uF, 220uf, 330uF, 470uF, 1000uF, 2200uF)
eBay ($3 for 10x2200uF @25V)
eBay ($2 for 10x 100uF-680uF, 5x1000uF-3300uF, 2x 4700uF-6800uF)
Mouser (Nichicon 6800uF 21@V)
Mouser (1000uF-6800uF High Value Electrolytic Caps exceeding 16V Tolerance
Your .1uF Output Capacitor explained) The Capacitor on the right side of the voltage regulator, or on the output, more accurately, it serves just about the same purpose except for it tries to keep the Vout constant. It filters:
A> any Input Ripple Voltage that may have passed through the voltage regulator and into your load
B> any Voltage from the Load that may flow back into the Regulator if you have an Inductive Load
C> any changes in Voltage due to a Low Impedance Load (as the Output pin MUST supply enough current to flow between the resistor connecting the Vout pin and the Adjust pin so that there is 1.25-Volts across that resistor; the Adjust pin consumes a negligible .5mA and so the way the LM317/337 works is due to the Current created by the 1.25-Volts across that resistor needing to flow throught your Rset resistor (if Radj is 125-Ohms and Rset is 1200 Ohms then 10mA is at the node between Rset and Radj and must flow through Rset to Ground creating a Voltage Drop of 10-Volts. Thats why Vout=1.25(1+Radj/Rset)[which is the same equation as a Non-Inverting Op-Amp with 1.25 on its Non-Inverting-Input and Radjust acting as the feedback resistor and Rset acting as the input resistor (as it is normally called that due to the Non-Inverting Amplifier Topology being the same as the Inverting Amplifier Topology if the Inverting amplifier had a negative DC-offset on its Non-Inverting Pin making the 0-Volts Ground input connected to it (when in Non-Inverting mode) seem like a Positive Differential VOltage input to the Op-Amp. This is why it can regulate any voltage down to 1.25 but not below (in my experiences it only goes to 1.28-9).
Back to Cout:
It supplies current to the load when your input voltage is fluctuating (due to a transient power loss at the input or if a branch connected to the input draws Voltage away from it temporarily). If Vin is below Vout then the regulator stops regulating as Vin supplies the Vref and the adjust pin is acting like the Feedback resistor in an inverting op-amp and when Vin drops below Vout then the Inverting input become greater than the non-inverting input and it outputs a Voltage Below Vout. Vout is the Emitter of a darlington transistor pair of NPNs with it's base connected to the Op-Amps input and this means that Vbe of the Darlington become Negative which turns it off. So if Vin is Bellow your input Voltage (the Vmax on your Input filter Capacitor) then no current Flows 'through' the regulator and the Output Cap will discharge into the load temporarily (until Vout
There should sometimes be a diode that is forward biased when Vout is greater than Vin and it is strapped across the regulator so that if Vin-1.25V is less than Vout the Capacitor doesn't supply Voltage into the Adjust Resistor which would result in Vout not fluctuating but would result in Vin going below Vout and the above situation results and, depending on the load, you can't be sure how the Load will discharge the Output Cap. Capacitive and Inductive loads would result in large transient Voltage Spikes. So this diode is necessary if you want an adjustable output so that the Capacitor can discharge into the input instead of the Output or Adjust pins as well as the Load.
The output capacitor should be a multi-layered ceramic capacitor and it shouldn't be polarized because your load may cause it be at a different polarity during transient voltage spikes on your output if the load is inductive or capacitive OR if their is parasitic Inductance or Capacitance (which their always is on a Voltage Regulator due to those three skinny legs; this is why the Adjust pin on the LM317 and LM337 is leg 1 for both but the input and output pins are not the same for both -there are different parasitic capacitance effects depending on the polarity of Vin as the Voltage of 1.25 across Vout and ADJ either flows from Vout to Adjust in the LM317 and from Adjust to Vout in the LM337.
I know that my mistake when making this circuit, or rather my attempt at making a circuit that is similar to yours, was trying to figure out the value of the output capacitor. Even though it's a pretty small capacitance it will have in equivalent series resistance that will mess with your load regulation because it's a parallel resistance with the load and your voltage divider to the adjust pin/GND
The output voltage capacitor value needs to be small enough so that it's corner frequency is larger than the frequency of any changes in load current due to changing the output load with a fast switch, mosfet or transistor (if you are creating an Adjustable Regulator imagine going from 10V to 5Volts with a low Impedance load; The Capacitor wouldn't Discharge when you changed the step. I originally had an Output Capacitor that not only was Electrolytic but also was pretty large thinking, "the larger the better if it's trying to provide stability". This resulted in the my Adjustable Voltage Regulator not changing it's output very quickly (it would actually hold it's output voltage for several minutes when I unplugged it -that is, when measured using a multi-meter so there was no Discharge path;if i had an LED attached the LED would slowly dim over the course of 5 seconds). If it has a lower corner frequency than it will not discharge the output capacitor fast enough and the output voltage could go into the LM317/337 Darlington NPN transistor output stage or the Adjust pin which only consumes .5 milliAmps and this could damage your Regulator over time.
Lastly, when I had a high Value electrolytic output Capacitor the Output Voltage wouldn't discharge when Vin
Unfortunately, as is with all thing 'Capacitive' the value to choose in Farads is best chosen with tial and error as each capacitor has an ESR and (Parallel/Series?) Inductance. The value depends on your load but I got my regulator supplying enough current to power a 5-watt computer Fan at +/-9-Volts (I connected the +Vsupply and the -Vsupply so the equivalent of 18 VDC) and I measured the Line Regulation and it only dropped 1.5 Volts when my Radj was 240-Ohms (as the Datasheet for the LM317/LM337 recommends.
My last piece of advice: don't think you can kill to birds with one stone by combining Rset and Radj into a single Adjustable Potentiometer. The Voltage Regulator works because 1.25 Volts creates a current that should remain constant and that current must flow through Rset and that creates the Voltage drop which sets the Output Voltage (which S/B the voltage across Rset +1.25, the voltage across Radj). If you use a single Pot your always changing the current between the Vout and ADJ pin and your also then changing Rset so it's very unstable and if you make Radj like 1 ohm then that 1-ohm portion of your pot between the output and the wiper connecting it to the ADJ pin is going to burn!
Here is my circuit using my simulator of choice: Texas Instruments 2016 release (it's only release) of the incredibly easy to use and simulate TINA (plus it's smorgasbord of TI parts already in its component select menu and multitude of examples. They don't have the LM337/LM317 in there though so I used Op-Amps with a single pass transistor output stage with two Diodes on their Non-Inverting inputs to represent the Band-Gap Voltage Reference.
EDIT: I wrote this while walking and using Voice2Text so I corrected the errors my phone made
LOOK-UP TABLE TO BE USED WHEN RECTIFYING AC VOLTAGE TO 25-VOLTS IN THIS CASE. IF YOUR DESIRED VDC IS 12 THEN DEVIDE THE NUMBERS IN THE FOURTH COLUMN BY 25 THEN MULTIPLY BY THEM 12. DISREGARD THE LAST THREE COULMNS ON RIGHT AS THEY ARE SIMPLY THE RATE OF CHANGE OF THE VAC IF YOU WANT TO DO INDUCTANCE OR CAPACITANCE FIELD EQUATIONS. THIS ASSUMED A MAINS FREQUENCY OF 50Hz RECTIFIED TO 100Hz: