0
$\begingroup$

I'm learning about derivatives. This is my code:

Series[f[x], {x, x0, 4}]
   t1 = f[x0 + δ] == (Series[f[x], {x, x0, 4}] // Normal ) /. (x - x0) -> δ
   t2 = f[x0 + 2 δ] == (Series[f[x], {x, x0, 4}] // Normal) /. (x - x0) -> 2 δ
   (f'[x0] /. Solve[{t1, t2}, f'[x0], f''[x0]]) // First // Collect[#, δ, Simplify] &

I don't know why the third argument of the solve could be f''[x0],for it is not domin.

Sorry,I didn't express it clear.I'm learning express higher-order approximations to derivatives using this link(http://sites.apam.columbia.edu/courses/ap1601y/) with the 2-FiniteDifference.nb .

Series[f[x], {x, x0, 4}]
t1 = f[x0 + δ] == (Series[f[x], {x, x0, 4}] // Normal ) /. (x - x0) -> δ
t2 = f[x0 + 2 δ] == (Series[f[x], {x, x0, 4}] // Normal) /. (x - x0) -> 2 δ
t3 = f[x0-δ] == (Series[f[x], {x, x0, 4}] // Normal)/. (x - x0) -> -δ 
t4 = f[x0-2δ] == (Series[f[x], {x, x0, 4}] // Normal)/. (x - x0) -> -2δ
(f'[x0] /. Solve[{t1, t2, t3, t4}, f'[x0], {f''[x0],f'''[x0],f''''[x0]}]  ) // First//Collect[#,δ, Simplify]&

What confuse me is why expression like {f''[x0],f'''[x0],f''''[x0]} can be domin.

$\endgroup$
7
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$
    – bbgodfrey
    May 13 '15 at 13:16
  • $\begingroup$ I presume you are asking about the warning message, Solve::bdomv: Warning: (f^\[Prime]\[Prime])[x0] is not a valid domain specification. Assuming it is a variable to eliminate. >>. Please read the documentation of Solve to see that the only valid third argument of this function is a domain. What are you trying to accomplish? $\endgroup$
    – bbgodfrey
    May 13 '15 at 13:21
  • 1
    $\begingroup$ If solving for more than one unknown, they must be in a list. Per documentation. $\endgroup$ May 13 '15 at 16:01
  • $\begingroup$ @bbgodfrey Actually that's not pragmatically true; see (41247). $\endgroup$
    – Mr.Wizard
    May 14 '15 at 12:38
  • $\begingroup$ jesns smith, I think understand your question and I have tentatively marked it as a duplicate. Please review that question (linked at the top of yours) and tell me if this answers your question. $\endgroup$
    – Mr.Wizard
    May 14 '15 at 12:39
1
$\begingroup$

Perhaps, you mean

Series[f[x], {x, x0, 4}]
   t1 = f[x0 + δ] == (Series[f[x], {x, x0, 4}] // Normal ) /. (x - x0) -> δ
   t2 = f[x0 + 2 δ] == (Series[f[x], {x, x0, 4}] // Normal) /. (x - x0) -> 2 δ
   (f'[x0] /. Solve[{t1, t2}, {f'[x0], f''[x0]}]) // First // Collect[#, δ, Simplify] &

which eliminates the warning message. I enclosed what were the second and third arguments of Solve in curly brackets, making them collectively the second argument. Of course, this may not be what you had in mind. If not, please clarify your question.

$\endgroup$

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