# Message Boards

Posted 9 years ago
4966 Views
|
5 Replies
|
1 Total Likes
|
 Hi all, I'm new to Mathematica and I'm not really familiar to the Mathematica functions and the language. Could any of you help me plot a quadratic with the following characteristics: vertex at (1.5, 1.75) roots at ('i' means the imaginary number 'i') How would I be able to do this?Thanks a lot!
5 Replies
Sort By:
Posted 9 years ago
 But what if you wanted to determine a? y==a(x-b)(x-c) Depending on one's equation, "sometimes" this may work: equ = -24-6 x+3 x^2 FullSimplify[equ,ComplexityFunction->LeafCount] 3 (-4+x) (2+x) Just to add: Both return the same equation to plot... MinimalPolynomial[3/2+I Sqrt[7]/2,x] 4-3 x+x^2 MinimalPolynomial[3/2-I Sqrt[7]/2,x] 4-3 x+x^2 
Posted 9 years ago
 Yes, it turned out that, in the case of your equation, the one I wrote 4 - 3 x + x^2 evaluated at x=1.5 is in fact 1.75  4 - 3 x + x^2/.x->1.5 so the coefficient in your case was a=1.But what if you wanted to determine a? Well, first off you could do that with pencil and paper! It is a trivial bit of algebra to solve for a from the equation y==a(x-b)(x-c) (note that I corrected your equation since you used 'a' as both the overall factor and as one of the roots) You can do this in your head! a== y/((x-b)(x-c)) Of course you could use the full power of Mathematica to do this In[1]:= Solve[y == a (x - b) (x - c), a] Out[1]= {{a -> -(y/((b - x) (-c + x)))}} So this brings me to a small bit of advice... ;-)This clearly is an exercise in basic algebra and although some might disagree with me, my position is that one should learn how to navigate the landscape of mathematics by hand if not before, then at least while one brings tools like Mathematica to bear on them. So, for example, looking at the two roots that you presented you should immediately see that they are complex conjugates of each other. And knowing that roots of polynomials with real coefficients are either real or come in complex conjugate pairs, you will know that the equation that you have will have real coefficients. And so on... And finally each step of the problem that you posed can quite easily be done by hand. If one has to resort to using Mathematica to solve this problem, then it actually is an indication that it would be a good idea to take a step back and ask whether one fully understands the concepts behind the question. If not then, taking that step back, review it "by hand" until the ideas are crystal clear. Then forge forward and delve deeper into the ideas beyond what you can do by hand using Mathematica. I hope you take this advice in the way it's intended! Sage advice from an old sage....
Posted 9 years ago
 Hey, thanks a lot for your help on this! Really helpful advices. What do you think is the best way for me to learn the basics of Mathematica?
Posted 9 years ago
 This is your quadradic: (x - (3/2 + I Sqrt[7]/2)) ((x - (3/2 - I Sqrt[7]/2))) Expand it to see what it is (and to make sure that it is a real function: Expand[(x - (3/2 + I Sqrt[7]/2)) ((x - (3/2 - I Sqrt[7]/2)))] gives 4 - 3 x + x^2 and then plot it: Plot[4 - 3 x + x^2, {x, -10, 10}] or you could go to Wolfram|Alpha and type in the equation above (http://www.wolframalpha.com/input/?i=4+-+3+x+%2B+x%5E2)
Posted 9 years ago
 However, if I wanted to make the quadratic equation, wouldn't it be in the form of: y=a(x-a)(x-b) In this case, how would I figure out the a value?