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

  • SEARCH
  • Home
  • 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 6915729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:30:41+00:00 2026-05-27T09:30:41+00:00

I have an equation which I try to plot and work with in Mathematica

  • 0

I have an equation which I try to plot and work with in Mathematica which is of the form

f(x,y) = (x^2 - a^2)^2 + x^2 y^2

Here x and y are independent variables and a is a constant. What is the standard way of defining a function such as this: should the constants/parameters be present in the list of arguments or should this list just contain the independent variables? Alternatively, should the parameters be present in the argument list but as optional arguments (with default values)?

  • 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-27T09:30:42+00:00Added an answer on May 27, 2026 at 9:30 am

    All of those options are possible, and each is reasonable in some circumstance.

    Present in the list of arguments:

    f[x_, y_, a_] := (x^2 - a^2)^2 + x^2 y^2
    

    Or:

    f[a_][x_, y_] := (x^2 - a^2)^2 + x^2 y^2
    

    Only the independent variables:

    Globally defined a value

    a = 3.14;
    f[x_, y_] := (x^2 - a^2)^2 + x^2 y^2
    

    As optional argument

    f[x_, y_, a_:3.14] := (x^2 - a^2)^2 + x^2 y^2
    

    You’ll need to be more specific regarding your use if I am to provide a more specific answer. The globally defined a value should be used with caution, but it is certainly not without its place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an equation which has been reduced to the form eqn1 := f(x,y,z)
I have a complex js function with an equation in which I actually need
I have a Android program which you type in equation and them program display
I have an underdetermined equation set (m equations of n variables, m smaller than
I have this JavaScript equation which I'm now trying to transform to PHP. JavaScript:
I have a list of numbers which form a series. I want to find
In MATLAB, I have an equation a*x+b=0 for which I have a and b
In Mathematica if I have a symbolic algebra equation, how can I get the
I have an equation with 4 variables, I am prompting the user to enter
I have a class that solves an equation using an approximation, evaluates the approximation

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.