0
$\begingroup$

I have:

Series[Cos[θ], {θ, ρ, 3}] /. θ - ρ -> x

Why the ReplaceAll does not work in this case? And how to make the replacement?

$\endgroup$
  • $\begingroup$ There is no expression θ - ρ in the SeriesData[] object returned by Series[..] Lookup SeriesData and examine the output of Series[Cos[θ], {θ, ρ, 3}] // InputForm $\endgroup$ – Michael E2 Aug 28 '16 at 22:05
1
$\begingroup$

Is this what you want?

ReplacePart[
 Series[Cos[θ], {θ, ρ, 3}],
 {1 -> x, 2 -> 0}]

Mathematica graphics

$\endgroup$
0
$\begingroup$

To understand why what you suggest doesn't work, look at

FullForm[Series[Cos[θ], {θ, ρ, 3}]]

This does not have any terms in θ-ρ to match. You can achieve what I think you want with

Normal[Series[Cos[θ], {θ, ρ, 3}]] /. θ -> x + ρ // Series[#, {x, 0, 3}] &
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.