Recent content by trouty323

  1. T

    Derive using Taylor series/Establish error term

    Honestly, it's been several years since I've worked with Taylor series. The class is Numeral Methods. I'm confused by how the formula is set up. Everything I've looked up online does not look like this at all.
  2. T

    Derive using Taylor series/Establish error term

    Homework Statement Derive the following formula using Taylor series and then establish the error terms for each. Homework Equations f ' (x) ≈ (1/2*h) [4*f(x + h) - 3*f(x) - f(x+2h)] The Attempt at a Solution I honestly have no idea how to go about deriving this. The professor did...
  3. T

    Finding Multiple Roots of Equations

    Homework Statement Hello everyone. My task is to find the largest positive root in a specific interval of a function using the bisection method, Newton-Raphson method, and secant method. I've written code for all three of these methods, but the only way I can find all of the roots is to hard...
  4. T

    Finding Multiple Roots of Equations

    Homework Statement Hello everyone. My task is to find the largest positive root in a specific interval of a function using the bisection method, Newton-Raphson method, and secant method. I've written code for all three of these methods, but the only way I can find all of the roots is to hard...
  5. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    Thank you very much! That helped a lot. Also, thanks to everyone else. Greatly appreciated!
  6. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    I realize that I could do that, but wouldn't I then have to create a separate routine for g(x)? I'm trying not to duplication the routine.
  7. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    I appreciate all of your guy's input. I just have a hard time understanding it if it's not shown to me.
  8. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    This is not my whole code, but it's really the only part that matters. It may be easier for you to see it than for me to try to explain it to you. The section right below me is called from my main function. I also want to be able to call this same function from main right after this one is...
  9. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    The way my book describes it seems like they are assigning two whole functions to two separate variables. Then, when I call both functions in my main function, I can easily use one variable, let's say f for both, to go to the right function. Sorry if that seems confusing, I am sort of a beginner.
  10. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    Basically, I do not want to reuse code that only needs one thing changed. I want to have one function with one equation, and one function with the other equation. I would have these functions set aside and in my function where I compute the roots, I would call the function and it automatically...
  11. T

    Comp Sci How Do You Assign Functions to Variables in C++?

    Hello everyone. I have an assignment that is asking me to find the roots using the bisection method. We are to find roots for two different functions. f(x) = x3 + 3x - 1 and g(x) = x3 - 2sin(x) I was wondering if there is any way to assign these functions to the variables f and g...
  12. T

    Comp Sci Java Error: The operator > is undefined for the argument type(s) E, E

    Anyone? data[] is an array that holds generics. I should have said that instead of saying "E." I can't seem to find a decent website that explains how to compare generic values.
  13. T

    Comp Sci Java Error: The operator > is undefined for the argument type(s) E, E

    Hello. The method here is to add an item to a heap. As the title states, I am getting the error "The operator > is undefined for the argument type(s) E, E" in the parenthesis after the while. I assume this is not the correct way to compare E values. Does anybody know what would be the correct...
  14. T

    Java Java: Creating my own Linked List

    Hello everyone. My task here is to construct my own linked list. The outer class is SLList and the inner class is Node. The problem that I seem to be having is when I try to use the fields of the outer class in the inner class, I am getting "cannot make static reference to the non-static field."...
Back
Top