I've always stumbled when looking at even simple circuits that use capacitors or inductors and trying to work out why it is there, without using "past experience".
What I mean is, if we need to limit the current we know that we need to use a resistor and we know how to work out which we need. If we need to reduce the voltage to something we again know we can use a resistor.
If we need to stop the flow of current in a specific direction we know that we need to use a diode.
All this can be worked out mathematically and "learnt" as circuits 101.
But I can't seem to find out information how to know when to use a capacitor, for example: We have X and Y and wasn't Z... "Oh so we need a capacitor here".
All the explanations for capacitors I've seen in circuits have been from peoples practical knowledge or past experience... without that, you wouldn't have known that you would have needed a capacitor.
My brother who's doing some electronics in school brought a simple circuit diagram home that they are making and yet there's a capacitor in it.
How do you work out and know that you need a capacitor without relying on past experience "I found if I stick in a capacitor it helps..." how do you learn or know when to use a capacitor from the start / design stage?