Message Boards Message Boards

0
|
4943 Views
|
7 Replies
|
6 Total Likes
View groups...
Share
Share this post:

[?] Plot f(A^2) in Y axis and A^2 in x axis?

Posted 7 years ago

I have the following function

F(A^2)= G (1 - A^2/4 + \[Alpha] A^4/8 - 5 \[Gamma] A^6/64) - d

I want to plot this in Y axis and X axis should be A^2. Please help me in this regard.Here

 \[Alpha] = 0.114;
\[Gamma] = 0.003;G = 0.1;d = 0.2;
POSTED BY: Dia Ghosh
7 Replies
Posted 7 years ago

Thank You Sir

POSTED BY: Dia Ghosh
Posted 7 years ago

Sir,

This time I am having a cubic equation

`\[Epsilon] (9/16 G \[Gamma] a^3 - G \[Alpha] a - 1)`

I want find the roots of this equation.Following the above mentioned method by you I have written the code

f[a_] := \[Epsilon] (9/16 G \[Gamma] a^2 - G \[Alpha] - 1)
In[2] := f[A]
Out[2] = 0.014 (0.0984375 A^3 - 2.5 A - A)
\[Alpha] = 1; \[Epsilon] = 0.014
\[Gamma] = 0.07; G = 2.5;
Plot[f[a], {a, 0, 45}, PlotRange -> All]

The solution gives me only one root but it supposed to give three.Am I wrong can you please hep Sir.

POSTED BY: Dia Ghosh

Hi Dia,

I suggest to use for your notations lowercase letters. It is a convention in Wolfram Language for users to use names which begin with lowercase letters.

So, we define the function $f[a]$, define user's parameters and plot the function:

f[a_] := \[Epsilon] (9/16 g \[Gamma] a^3 - g \[Alpha] - 1)
\[Alpha] = 1; \[Epsilon] = 0.014; \[Gamma] = 0.07; g = 2.5;
Plot[f[a], {a, -5, 5}]

enter image description here

We can use the function $Solve[ ]$ to obtain the roots of the equation $f[a]=0$

In[30]:= Solve[f[a] == 0, a]
Out[30]= {{a -> -1.64414 - 2.84774 I}, {a -> -1.64414 +  2.84774 I}, {a -> 3.28828}}

There are two complex roots and one real.

Posted 7 years ago

Thank you very much. I was looking for this graph but the syntax was not known to me. Thanks a lot

POSTED BY: Dia Ghosh
Posted 7 years ago

Thank you for responding, actually I want to plot f(A^2) with respect to A^2.

POSTED BY: Dia Ghosh

Here you are:

Plot[f[a], {a, 0, 45}, PlotRange -> All]

enter image description here

Hi Dia, Your problem is somewhat unclear. Nevertheless, I hope to understand your requests as close as possible. Firstly, we need to define the function $f[a]$ as:

f[a_] := G (1 - a/4 + \[Alpha] a^2/8 - 5 \[Gamma] a^3/64) - d

Your $F[A^2]$ is obtained as

In[2]:= f[A^2]
Out[2]= -0.2 + 0.1 (1 - A^2/4 + 0.01425 A^4 - 0.000234375 A^6)

Let us define the parameters:

\[Alpha] = 0.114;
\[Gamma] = 0.003; G = 0.1; d = 0.2;

Now, the graphs may be plot:

Plot[{f[A^2], Sqrt[A], -Sqrt[A]}, {A, 0, 9}, PlotStyle -> {Red, Blue, Blue}]

enter image description here

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