Message Boards Message Boards

0
|
8061 Views
|
12 Replies
|
4 Total Likes
View groups...
Share
Share this post:

FindMaximum failing

Posted 10 years ago

Hi all..

I am trying to find the maximum point for the following graph.. it is visually clear that it is around 1300..

I was wondering whats the command for it...

Is it FindMaximum [{Cp[[Delta]]}, {[Delta], 0, 1}]]? i tried this and it dint work ..

Any help would help..

Thanks in advance..

enter image description here

POSTED BY: ash ash
12 Replies
Posted 10 years ago

Sorry in the first hand. yes! i missed to paste the [Mu]m , i was only not sure with the command to be used. may be i should read the posting guidelines.. i am only learning mathematica. is there a rule that i cannot ask basic or east questions in this forum?

POSTED BY: ash ash
Posted 10 years ago

but thanks it helped. i was only asking if FindMaximum would work.. it worked when i wrote it after plot syntax.

POSTED BY: ash ash

Hello Ash Ash,

I am sorry if my response appeared to be rude to you. It was not my intention. Danny is correct that the probability of getting a response is increased if code can be cut-and-pasted from the post.

I believe that basic questions should be encouraged. However, if the poster makes an effort (to fix syntax, look for a working example in the documentation, and make sure that all variables which be defined are defined), that effort will be rewarded by learning.

POSTED BY: W. Craig Carter
Posted 10 years ago

Thanks..

I just have a follow up question..

What would be the command in case if delta is known.. for example, delta = 0.3 and I need to get the corresponding y axis value..

POSTED BY: ash ash

Hello Ash Ash, Perhaps I misunderstand your question. I am assuming that you are no longer interested in a maxima.

To find the value of an expression for a particular value of a parameter, you can use slash-dot with a rule:

 expr = a Cos[ b x]

 expr /. a -> 2

 expr /. {a -> 2, x -> 3}

 expr /. {a -> 2, b -> 3, x -> Pi}

More information can be found here: tutorial/ApplyingTransformationRules

POSTED BY: W. Craig Carter
Posted 10 years ago

thanks! that was clarifying! :)

POSTED BY: ash ash

Hello, While at risk of encouraging those who do not read the posting guidelines or the documentation....

Pn = 40;
\[Mu]p = 0.2;
cp = -Pn (
  0.066 (56250.` \[Delta]^2 + 24496.` \[Delta] \[Mu]m - 
     18723.` \[Delta]^2 \[Mu]m - 480.` \[Mu]m^2 + 
     540.` \[Delta] \[Mu]m^2 - 
     135.` \[Delta]^2 \[Mu]m^2))/(\[Delta] (168.` \[Delta] - 
     9.` \[Delta]^2 + 160.` \[Mu]m - 180.` \[Delta] \[Mu]m + 
     45.` \[Delta]^2 \[Mu]m)) (\[Delta] - 1)/\[Mu]p
temp = cp /. \[Mu]m -> 1
Plot[temp, {\[Delta], 0, 1}]
FindMaximum[temp, \[Delta]]

with hopes that I can get someone to look at my CUDA questions on community.... sigh. WCC

POSTED BY: W. Craig Carter

(1) Post actual code with the question. A picture of code is not a usable substitute.

(2) From the notebook I can see there is an undefined \[Mu]m (as well as an unused \[Mu]p).

(3) The Solve syntax is incorrect. While this is not a forum for issues of basic Mathematica syntax, I will remark that you get no output because the input never reaches the stage of evaluation.

(4) You define Cp as a function of a dummy variable delta. Also it has Npwhich uses a delta in its definition. But these are not the same because it is not that dummy variable: you have a scoping problem. Here is what I mean.

Cp[t]

(* Out[21]= -((
 13.2 (-1 + t) (56250. \[Delta]^2 + 24496. \[Delta] \[Mu]m - 
    18723. \[Delta]^2 \[Mu]m - 480. \[Mu]m^2 + 
    540. \[Delta] \[Mu]m^2 - 
    135. \[Delta]^2 \[Mu]m^2))/(\[Delta] (168. \[Delta] - 
    9. \[Delta]^2 + 160. \[Mu]m - 180. \[Delta] \[Mu]m + 
    45. \[Delta]^2 \[Mu]m))) *)
POSTED BY: Daniel Lichtblau
Posted 10 years ago

I pasted the picture, only to show what i really want to ask. in this case the syntax to be used..

3) is there even a rule that i cannot ask basic or easy questions in this forum?? in that case, it is a pity for beginners .

POSTED BY: ash ash

Find derivative

D[Cp[\[Delta]], \[Delta]]

Then solve

Solve[D[Cp[[Delta]], [Delta]]==0, [Delta]]

This will give value of delta at maximum.

POSTED BY: S M Blinder
Posted 10 years ago

Sorry...I get an error when i tried that command... Is it something like what i have attached in the file..?

Attachments:
POSTED BY: ash ash
Posted 10 years ago

actually no output displays..

POSTED BY: ash ash
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract