1
$\begingroup$

I have:

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

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

$\endgroup$
1
  • $\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, 2016 at 22:05

2 Answers 2

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 and acknowledge you have read our privacy policy.

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