find a function f given that (1) the slope of the tangent line to graph of f at any point P(x,y) is given by dy/dx=3xy and (2) the graph of f passes through the point (0,2)

dy/dx = 3xy

dy/y = 3x dx
ln y = 3x^2/2+c
y = Ce^3x^2/2

2 = Ce^0
C = 2

y = 2e^(3x^2/2)
y' = 2e^(3x^2/2)*(3x)
= 3xy

To find the function f that satisfies the given conditions, we need to integrate the given differential equation. The differential equation given is:

dy/dx = 3xy

Let's start by separating the variables:

1/y dy = 3x dx

Now, we integrate both sides of the equation with respect to their respective variables. The integral of 1/y with respect to y is ln|y|, and the integral of 3x with respect to x is (3/2)x^2. Applying the integrals:

ln|y| = (3/2)x^2 + C

Here, C represents the constant of integration that we need to determine. To find the value of C, we use the condition that the graph of f passes through the point (0,2). Substituting x = 0 and y = 2 into the equation, we have:

ln|2| = (3/2)(0)^2 + C
ln|2| = C

Therefore, the constant of integration C is ln|2|. Plugging this value back into the equation, we get:

ln|y| = (3/2)x^2 + ln|2|

Remember that ln|y| is the natural logarithm of the absolute value of y since y can be positive or negative.

To find the function f, we need to exponentiate both sides of the equation. This will eliminate the natural logarithm. We have:

e^(ln|y|) = e^((3/2)x^2 + ln|2|)
|y| = e^(3/2)x^2 * 2

Since y can be positive or negative, we consider both cases:

Case 1: y = e^(3/2)x^2 * 2

Case 2: y = -e^(3/2)x^2 * 2

So, the function f can be written as:

f(x) = e^(3/2)x^2 * 2 (for Case 1)
f(x) = -e^(3/2)x^2 * 2 (for Case 2)

These functions satisfy the given conditions: the slope of the tangent line to the graph of f at any point P(x, y) is dy/dx = 3xy, and the graph of f passes through the point (0, 2).