Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Derivative of a real function gives Complex res...' topicStudent Support Forum > General > "Derivative of a real function gives Complex res..."

Next Comment >Help | Reply To Topic
Author Comment/Response
Dimanche
11/22/12 8:24pm

Hi there!
I have found an interesting bug (or at least I can't explain this):

f1[x_] := Sin[2*Pi*x/10] + I*Cos[2*Pi*x/20]
f2[x_] := Abs[f1[x]]
f3[x_] := f2'[x]
f3[1]

Output looks like:
(-(1/40) I (-1 + Sqrt[5]) \[Pi] +
1/20 (1 + Sqrt[5]) \[Pi]) Derivative[1][Abs][
Sqrt[5/8 - Sqrt[5]/8] + I Sqrt[5/8 + Sqrt[5]/8]]


So, initially I had a complex function (f1), then turned it into a real value function (f2), then attempted to get a derivative - voila! - imaginary unit is back! How?!!!

Just in case - attached is a screenshot.

Attachment: glitch.JPG, URL: ,

Subject (listing for 'Derivative of a real function gives Complex res...')
Author Date Posted
Derivative of a real function gives Complex res... Dimanche 11/22/12 8:24pm
Re: Derivative of a real function gives Complex... Nasser M. Ab... 11/24/12 00:50am
Re: Derivative of a real function gives Complex... Sumit 11/24/12 02:03am
Re: Re: Derivative of a real function gives Com... Dimanche 11/24/12 12:03pm
Next Comment >Help | Reply To Topic