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 7001345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:47:29+00:00 2026-05-27T20:47:29+00:00

I have to implement this algorithm in Mathematica: My problem is that I don’t

  • 0

I have to implement this algorithm in Mathematica:

Algorithm

My problem is that I don’t really understand the Mathematica syntax because there aren’t a lot of useful examples out there. What I have done:

(* Input: 4 Points*)
Array[sx, 4, 0];
Array[sy, 4, 0];

sx[0] = -1; 
sy[0] = 0;

sx[1] = 0;
sy[1] = 2;

sx[2] = 1;
sy[2] = 4;

sx[3] = 3;
sy[3] = 32;


P[x,0]:=sy[0];

P[x, k_] := 
  P[x, k - 1] + (sy[k] - P[sx[k], k - 1])*
    Sum[(x - sx[j])/sx[k] - sx[j], {j, 0, x}]; 

(I tried to implement the geometric mean but I failed because I can’t even calculate the Sum.)

How can I implement the recursion correctly? (an the geometric mean)

  • 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-27T20:47:29+00:00Added an answer on May 27, 2026 at 8:47 pm

    You can define a function P like this :

    P[x_, 0]  := sy[0] 
    P[x_, k_] := P[x, k - 1] + (sy[k] - P[sx[k], k - 1])*
                 Product[(x - sx[j])/(sx[k] - sx[j]), {j, 0, k - 1}] // Simplify
    

    Setting values sx and sy as you defined above we get :

    In[13]:= P[x, 1] 
    Out[13]= 2 (1 + x)
    
    In[14]:= P[x, 2]
    Out[14]= 2 (1 + x)
    
    In[15]:= P[x, 3]
    Out[15]= 2 + x + x^3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this algorithm that I want to implement on VB6. Sub Main() dim
I'm solving some problem that involves Rabin–Karp string search algorithm. This algorithm requires rolling
I have the following (imperative) algorithm that I want to implement in Haskell: Given
This is regarding AES algorithm. Suppose i have implemented a AES algorithm and encrypt
I have BaseView which implement UIViewController. Every view in project must implement this BaseView.
I am trying to implement this demo on my local machine. http://bit.ly/4g4o1r I have
I have three current thoughts on how to do this: re-implement AuthenticationService, which uses
How can I implement generics in this program so I do not have to
I have this piece of logic I would like to implement as a trigger,
I have this question: Does implementing a custom MembershipProvider class needs you to implement

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.