Please excuse a newbie. I have a situation that seems to be straightforward, but I can’t seem to find the right keywords to do a productive search.
I’ll describe it in plain language:
I have a function of theta, which I call M, and a different function of theta, which I call C. I would like to plot M*C over a range of theta.
I seem to make syntax errors when I input, and I don’t get a plot. I have tried everything I can think of.
Can anyone show me what to type?
Yes, I can do the plots of each function separately, and I know I could plot the product directly, without defining them as M and C. However,
the functions are not simple, and my report will have plots of MC, MMMC, and other combinations, hopefully without replicating the details of the
complicated functions.
Carl
You must show some of what you have already tried and what is not working. Send more detail.
Thank you for you response. I realize I should exercise more due diligence before I weigh in here.
Carl
Carl, please inspect the attached trivial file from which you probably infer how to deal with exactly your case. Notice that in Mathematica it is not a good idea to let user-defined quantities have names that begin with a capital letter: see what happens if you use C instead of my modified version of it.
Good luck, Ulri
communityB.nb (10.7 KB)
Ulrich-
Thanks for the input. I had reached the same conclusion after a little search. What I had wanted to do was
simply “represent” a complicated function with a capital letter. Instead I have to “define” a function, and since, in
Mathematica, caps are used for built-in functions, it may disallow caps for defined functions. Also, it results in
some extra baggage, like using m[x] instead of just m, etc. Of course, you knew all this and I am just catching
up!
Thanks again-
Carl
Actually you don’t need ‘function notation’ with ‘[]’ and can work simply with expressions as is done in the appended file.
communityD.nb (10.9 KB)
Yes, indeed! That’s where I started, but it wouldn’t work because I used caps.
Thanks for your patience.
Carl