-2

I have two numbers a and b such that a*a*b=constant. How can I find all as and bs which satisfies this equation?

Can I have a graph for example for a versus b?

Actually, I am looking for a relationship between a and b, as an example an equation for their graph mentioned before.

shaloo shaloo
  • 213
  • 1
  • 2
  • 9

1 Answers1

2

Let c be the constant, then

a*a*b=c

We find an explicit solution for b(a) by

b = c / (a^2)

Now we can easily plot b vs. a. E.g. for c=1 :

  1. Specify which points for a you want to plot. E.g. a = -2:0.1:2
  2. Calculate b: b = c ./ (a.^2);
  3. Plot b vs. a: plot(a,b);

All together:

c = 1;
a = -2:0.1:2;
b = c ./ (a.^2);
plot(a,b);

plot

hbaderts
  • 14,136
  • 4
  • 41
  • 48