I am very new to mathematica, but it would be much easier for me to use For loops in order to create variables. My train of thought was simple, but apparantly does not work. Let's say I defined these variables
ex1 = 1 + 0.5
ex2 = ex1 + 0.5^2/2!
ex3 = ex2 + 0.5^3/3!
ex4 = ex3 + 0.5^4/4!
ex5 = ex4 + 0.5^5/5!
ex6 = ex5 + 0.5^6/6!
Next step in my numerical methods class was to get the absolute error, which means subtracting the real value from the experimental value I would get from "ex1", for example. What we are trying to approximate here is e^0.5, by the way.
So what I did first was:
ae1 = (e^0.5 - ex1)
And just repeated that step for all of them. I'd like to introduce these into a For loop, though, where I'm defining variables and using past variables in the loop. My train of thought was:
For[i = 1, i < 7, i++, Print[aei = (e^0.5 - exi)]]
This obviously doesn't work, but is it possible to do something like this?
Series[E^x, {x, 0, 5}] // Normal
to get taylor series of that function. $\endgroup$