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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:30:57+00:00 2026-06-07T22:30:57+00:00

I am trying to solve the inverse problem for the following function in R.

  • 0

I am trying to solve the inverse problem for the following function in R.

x + 2 (C1 * y) + C1 * C1 * z = d2

I can currently enter C1 and get d2 but need to enter d2 and get C1. The variables x, y and z are all known and never change.

I already have some known C1 and d2 values to use.

 C1     d2 
 5   0.000316
 0   0.000193
-5   0.000123

Is there an R function which will allow me to enter the function, previous results and a d2 value and for it return the C1 coefficient?

  • 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-06-07T22:30:59+00:00Added an answer on June 7, 2026 at 10:30 pm

    You have a quadratic equation of the form:

    (x - d2)*C1^0 + (2*y)*C1^1 + (z)*C1^2 = 0
    

    You can solve quadratics (and in fact any polynomial equation) with the function polyroot() in R:

    x <- 1
    y <- 2
    z <- 3
    
    d <- 0
    
    polyroot(c(x-d, 2*y, z))
    [1] -0.3333333+0i -1.0000000+0i
    

    (Which gives two solutions, as you would expect)

    To solve for a range of input values, you need to put this into your favourite apply function, in this case sapply():

    d <- seq(0, 1, 0.2)
    
    sapply(d, function(dd)polyroot(c(x-dd, 2*y, z)))
    
                  [,1]          [,2]          [,3]          [,4]           [,5]         [,6]
    [1,] -0.3333333+0i -0.2450296+0i -0.1722534-0i -0.1088933-0i -0.05203037+0i  0.000000+0i
    [2,] -1.0000000+0i -1.0883037+0i -1.1610799+0i -1.2244400+0i -1.28130296+0i -1.333333+0i
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to solve the following problem in Redis. I have a list that
I am trying to solve the following problem with Puppet: I have multiple nodes.
Trying to solve a very simple problem using mvvm-light, but after days of sifting
I have been trying to solve this problem all day, I googled a lot,
I'm trying to solve the following problem: I have a download button that when
I'm trying to solve a problem I've got on my homework. How can I
Trying to solve this problem: I have the following set of divs that when
I'm trying to solve an AVAudioSession problem since many hours ago and didn't get
I'm trying to solve a problem which asks to find all squares of 1
I'm trying to solve the below problem. I feel like it is possible, but

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.