From my understanding in a pure inductor connected to a DC supply, the current will keep rising until infinite. The rate which it rises is determined by it's inductance.

When a pure inductor is connected to an AC supply, it's reactance will limit the current flow to a certain value, similar to resistance in an AC circuit.
I thought the peak values of this current would be constant but I have made a simulation in TINA-TI with an inductor in series with an AC supply and these are the results I have.

The top readout is current of inductor
Middle is Voltage of AC Source
Bottom is Voltage of Inductor

My question is why does the peak current look like it slowly decreases over time?

The AC amplitude looks constant, as expected. There is a DC current drift, as #12 noted. It could be a round-off error in the simulation where the negative peak source voltage is minutely larger than the positive peak voltage.

Notice that the average current decays to zero, not some DC value (look at the vertical scale).

OK, here's the deal:
In an ideal inductor, the current i(t) is the integral of the voltage, v(t), across it:

i(t)=(1/L)*∫(v(t)dt
The sine excitation in the simulation did not start at the Big Bang, so:
v(t)=u(t)*sin(ωt), where u(t) is the unit step function.
i(t)=(1/L)*∫(u(t)*sin(ωt))dt
This integral of products can be solved by Integration by Parts:
i(t)=(1/L)*u(t)*((-1/ω)*cos(ωt)) - ∫δ(t)*(-1/ω)*cos(ωt)dt.The first term is what you would expect for a steady-state sine excitation.The second term is due to the unit step function when the sine wave starts.
The second term evaluates as u(t)*(-1/ω), because cos(wt)=1 at the time of the unit impulse (t=0).
This accounts for the DC term in the current. So, the final expression is

i(t)=(1/L)*u(t)*((-1/ω)*cos(ωt)) + u(t)*(1/ω)

Note that, in the simulation, if you change the Maximum TimeStep to something like 0.1% of the period of the sine wave, the DC component decays VERY slowly, and is probably ultimately determined by the inductor's series resistance, which defaults to 1 millohm in LTspice, although this can be changed in the program. Zero resistance will result in an error message.
Who wudda thunk that applying a sinusoidal source to an inductor would result in a DC current?
I didn't actually calculate values in an example, to see if I had screwed up the scaling, but I'm pretty sure the concept is correct.

Ron, I can't read calculus. Did you just say the simulation is correct, as far as the instructions it was given?

Click to expand...

Yeah, that's the bottom line. As I said, the decay time seems to be dependent on the Maximum TimeStep in the sim. Not sure why this is the case.
I learned something new in going through the math. If I had encountered this situation before, I never gave it much thought. The final result was a revelation to me.
We have some members here who are much better at math than I. Perhaps they can back me up, or shoot me down.