-2
$\begingroup$

I am trying to illustrate sum of functions. I have one function x*x - 8*x + 7 and another Log[2*x + 4.5] I understand that I must add all of coordinates both of these functions. I use function Plot : Plot[{x*x - 8*x + 7 && Log[2*x + 4.5]}, {x, -10, 10}] But it doesn't draw. Can you tell me how it must be. Thanks.

$\endgroup$
2
  • 7
    $\begingroup$ need to type 15 char to provide the worlds shortest answer : "+" $\endgroup$ Commented Mar 12, 2015 at 18:23
  • 1
    $\begingroup$ If you want to draw two lines, one for each function, replace && with a comma ,. If you want to draw the literal mathematical sum, just replace && with +. But note that the log will not be defined for x < -2.25. $\endgroup$ Commented Mar 12, 2015 at 18:24

1 Answer 1

3
$\begingroup$

Your first function can have complex values for x < 0, so you can define:

f1[x_] := Re[x^x + 8 x + 7]; f2[x_] := Log[2 x + 4.4] 

and then plot the functions together with the sum:

Plot[{f1[x], f2[x], f1[x] + f2[x]}, {x, -1, 1}, PlotLegends -> "Expressions"] 

But with the range -10 < x < 10, you won´t see much left of the y-axis, due to the growth of the first function.

Sum of the functions

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.