TRENDING NEWS

POPULAR NEWS

Function Help Answer Is Wrong

Help answer this function?

the answer you're looking for is f(x) = -4x + 24

to get that, look at the answers, between 20 and 16, it's -4 16 to 12 is -4 and 12 to 8 is -4

because the difference is constant, you know you'll have -4x

if you multiply each of the x's by -4 you get -4, -8, -12, -16,

to get to each of the answers, you just add 24. this gives you your function: f(x) = -4x + 24 or y = -4x + 24

C++ function help needed?

Hey, I need to make a function that should loop through the file pointed to by the ifstream parameter and count the number of times that the specified character appears. After counting the characters, the function should return that value as the output. I know my code is wrong but here's what I've got at the moment:

#include
#include
#include //Do I need this??
#include

using namespace std;

int countCharsHelper(ifstream &cstream, char c);

int main()
{
string file_name;
ifstream my_input;

cout << "What file name?\n";
cin >> file_name;

my_input.open(file_name.c_str());

char d;
cin >> c;
cCount=0//Variable to count the repetitions of char c
while ( my_input >> d){

if(d==c){
cCount++;
}
}
return cCount;

}

Is this a function? Please help!?

no because x=7 is a vertical line

First draw the graph
in order for an equation to be a function it needs to pass the vertical line test which means that when you draw vertical lines through a graph it can only hit one point on the graph

in this case x=7 is a vertical line so by doing the vertical line test every point would be hit on the graph therefore x=7 is not a function

Hope this was Helpful!

Algebra 2 Functions Help?

YES, the inverse of a relation can most definitely can be a function.

A function means that for every x there is one, and only one, y.
On a graph, that means that if you draw a vertical line, it will only cross the graph once, thus only one y-coordinate for each x-coordinate.

all lines that can be put in the form of y=mx+b are functions.
the line x=k, where k is any constant, is not a function.

the relation: x = a(y - k)² + h, where a is a constant and (h,k) is the vertex,
is a parabola on it's side. Definitely not a function.

it's inverse: y = a(x - h)² + k, is a parabola going up or down and definitely is a function.

making it easier:
x = y² is not a function, (ie, if x=4, y can be 2 or -2 and there can only be one y for each x)
the inverse, however, is y = x², which is a function.

A function and it's inverse are reflected over the line y=x. The x and y switch.

Hope this helps! This could easily be a whole book or at least a chapter, but still I hope it helps.

that's it! ;)

MATLAB: What is wrong with this Euler´s method function?

I tried to write a function for Euler´s method for a course I´m doing, but it doesn´t seem to work, could someone please tell me where they think it´s going wrong?

function [time,func] = eulermethod(f,start,finish,startvalue,h)
%Solves a differential equation using Euler's Method

steps=(finish-start)/h+1
y=startvalue;
t=start;
t0=t;
time=t0;
func=y;

for i=2:steps
y1=y+h*(t,y);
t1=t0+(i-1)*h;
time=(time,t1);
func=(func,y1);
y=y1;
t=t1;
end

Math Function Rule Help.?

It's really simple instead of x place 0 and 2.
f(0)= 2 * 0+3=3
f(2)=2 * 2 + 3=7
it is saying that instead of all x's in equation place 0 and 2.

Can more than one value satisfy a function? Help?

A function is a special relationship between values: Each of its input values gives back exactly one output value.

The answer is yes. If only one input value satisfied a function, it would not be a function but a simple equation. Every value you put into a function should return either a defined value or an undefined statement. Because you could get back an undefined statement, not every value may satisfy a function, but for it to be a function, more than one value must satisfy it.

Assuming this is meant to be code in C, C++ or Java then the parentheses should surround the conditional expression:if (answer == “C”) {
// ...
}
If the code is intended to be C or Java then this is unlikely to yield the intended effect if that is equality with the string “C” (that is you are making a semantic error as well as a syntactic error). If it is C++ and answer is a std::string then you are fine.

Polynomial Function help!?

A graph of your polynomial is at the link below.

The Y intercept is the easiest. set x = 0. The result is y = 8.

To find all minima and maxima, differentiate, set equal to zero and solve. Since the derivative is still above 2nd degree, you will need the methods described below for this as well.

Solving a polynomial above 2nd degree involves using the rational root theorem, Descartes rule of sign changes, and synthetic division. The rational root theorem will give you a list (sometimes long) of possible rational roots. You then have to begin testing each of them. Descartes rule can help narrow down the list by indicating how many roots might be positive or negative. When you find a root, you make a factor from it then use synthetic division to reduce the degree of the polynomial. The goal is to reach 2nd degree so you can solve it with factoring, completing the square, or the quadratic formula.

The rational root theorem states that if there are rational roots they will be of the form:
(+/-) (factor of the constant term) / (factor of the leading coefficient).
1/7, 2/7, 4/7, 8/7, -1/7, 2/7, -4/7, -8/7
1/1, 2/1, 4/1, 8/1, -1/7, 2/1, -4/1, -8/1

Descartes rule of signs will reveal the maximum possible number of positive and negative roots. The maximum number of possible positive roots is the number of sign changes of the coefficients left to right (There are at most 0 positive roots). To find the maximum number of negative roots find f(-x) then count sign changes.
f(-x) = -7x^5+9x^4-x^3+9x^2-9x+8
(maximum of 5 negative roots) The total number of roots including he complex ones is equal to the degree of the polynomial.

The graph at the attached link narrows it down even farther. If there is a rational root it will be near -1.6. Since none of the possible roots correspond to the approximate -1.6 root then there are no rational roots. You would need to find 3 rational roots to solve this one, and the graph indicates there is only one root . this one can only be solved by numerical methods used by graphing calculators or other programs.

If you type solve 7x^5+9x^4+x^3+9x^2+9x+8 into wolfram alpha it will show the zero to 5 decimal places.

The automatic collapse function seems to rely on a "computer learning"algorithm where short answers by typically new or "unqualified"users are collapsed.  I think the algorithm is far more forgiving on answers by "qualified" users (say, known experts or Top Writers), but I haven't done any analysis myself.  It seems to mostly frustrate new users; however, on average it probably serves Quora better, since many new users tend to not appreciate the difference between a Quora "comment" (e,g., answers like "I don't know! ") and a  "real answer."  Many sarcastic and joke answers tend to also be rather short.  Like any learning algorithm, Quora QA will probably do an analysis whether the benefits (cleanup of useless answers) outweigh the current frustration by new users.  Quora, may also argue that short answers are the outcome of "bad questions."  Quora has explicitly posted that they prefer open-ended questions and frowns upon poll questions where a Yes/No answer will suffice.  So, from Quora's perspective there is no lost in "knowledge" by removing a short answer, even if it answers the question. I have no clue how many of my short answers have been collapsed, but the policy may affect how often I write short "impulsive" answers, just because "I can." In  other words it may force me to be more selective, and write fewer but better answers, which at the end it is not a bad thing.

TRENDING NEWS