Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grule = {g[r] -> -((6 f[r])/r^2) + (2 D[f[r], r])/r + D[f[r], r, r]}
- A = Laplacian[f[r] (3 Cos[theta]^2 - 1), {r, theta, phi},
- "Spherical"] // ExpandAll // Collect[#, {f[r], f'[r], f''[r]}] &
- A = A /. Sin[theta]^2 -> 1 - Cos[theta]^2
- (Coefficient[A, f'[r]] // Expand)/(2/r) // Expand
- (*3 Cos[theta]^2-1*)
- (Coefficient[A, f[r]] // Expand)/(-6/r^2) // Expand
- (Coefficient[A, f[r]] // Expand)/(-6/r^2) // Expand
- B = g[r] (3 Cos[theta]^2 - 1) /. grule
- A - B // FullSimplify
- (*0*)
Add Comment
Please, Sign In to add comment