Message Boards Message Boards

1
|
6015 Views
|
6 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Plot the product of two different functions of theta?

Posted 6 years ago

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

POSTED BY: Carl Smith
6 Replies
Posted 6 years ago

Yes, indeed! That's where I started, but it wouldn't work because I used caps. Thanks for your patience.

Carl

POSTED BY: Carl Smith

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

Attachments:
POSTED BY: Ulrich Mutze
Posted 6 years ago

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

POSTED BY: Carl Smith

Actually you don't need 'function notation' with '[]' and can work simply with expressions as is done in the appended file.

Attachments:
POSTED BY: Ulrich Mutze

You must show some of what you have already tried and what is not working. Send more detail.

POSTED BY: Moderation Team
Posted 6 years ago

Thank you for you response. I realize I should exercise more due diligence before I weigh in here. Carl

POSTED BY: Carl Smith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract