Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:42:15+00:00 2026-05-27T03:42:15+00:00

I am trying to create a Mathematica script which takes as input a function

  • 0

I am trying to create a Mathematica script which takes as input a function of two variables, and in turn computes all the necessary steps (finding roots of the first partial derivatives, checking the relevant 2nd order conditions) in a verbose manner (e.g. show all the partial derivatives) to find local extremal points.

Most of this is straightforward, my biggest problem is how to reuse the roots found by Solve[] in successive computations. I started like this:

f[x_,y_] :=  y^3 -3 x^2 y
dfx[x_,y_]:=D[f[x,y],x]
dfy[x_,y_]:=D[f[x,y],y]
dfxx[x_,y_]:=D[f[x,y],x, x]
dfyy[x_,y_]:=D[f[x,y],y, y]
dfx[x_,y_]:=D[f[x,y],x]
dfxy[x_,y_]:=D[f[x,y],x,y]
dff[x_,y_]:=dfxx[x,y]*dfyy[x,y]-(dfxy[x,y])^2
Solve[{dfx[x,y]==0, dfy[x,y]==0},{x,y}]
Apply[dff, %]
Evaluate[dff[%]]

I am stuck here, any help would be fantastic!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:42:15+00:00Added an answer on May 27, 2026 at 3:42 am

    How about this:

    solns = Solve[{dfx[x, y] == 0, dfy[x, y] == 0}, {x, y}]
    CheckSoln[soln_] := 
      (
        hessianDet = ReplaceAll[dff[x, y], soln];
        Print["First order condition solution: ", soln, 
            "; has Hessian determinant=", hessianDet
        ];
      )
    Map[CheckSoln, solns]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Ok so I am trying create a login script, here I am using PHP5
Trying to create a script to read a remote file and check the md5
I'm trying create this function such that if any key besides any of the
I am trying create an application which will clone the GIT repository to the
I'm trying to create function that provides historical volatility after getting symbol from Yahoo.
I am trying create a data.frame from which to create a graph. I have
I am trying create system in which I can login from php and then
I am trying create a trending system that displays which keywords are trending by
I am trying to create an agent-like object, that, given an two indices (agent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.