# Mathematical Reasoning

Solve a math question

|---|---|
| You can query a model directly and test the results returned when using different parameter values with the Cloud console, or by calling the Vertex AI API directly. - For an example of using the Vertex AI API, see [Quickstart using the Vertex AI API](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/api-quickstart). - To view this sample in the Cloud console: [Go to Google Cloud console](https://console.cloud.google.com/vertex-ai/generative/language/prompt-examples/Mathematical%20Reasoning) <br /> ||
| #### Prompt Freeform Answer the question in the image with step by step solution. #### Response Here is the step-by-step solution for multiplying and simplifying the given expressions. **Problem 1:** Multiply and simplify: (√x + 2√3)² **Solution:** We can use the formula for squaring a binomial: (a + b)² = a² + 2ab + b². In this expression, a = √x and b = 2√3. 1. **Square the first term (a²):** (√x)² = x 2. **Find twice the product of the two terms (2ab):** 2 \* (√x) \* (2√3) = 4 \* √(x \* 3) = 4√(3x) 3. **Square the second term (b²):** (2√3)² = 2² \* (√3)² = 4 \* 3 = 12 4. **Combine the terms:** x + 4√(3x) + 12 The simplified expression is **x + 12 + 4√(3x)**. *** ** * ** *** **Problem 2:** Multiply and simplify: (√x + √3)(√x - √3) **Solution:** We can use the formula for the difference of squares: (a + b)(a - b) = a² - b². In this expression, a = √x and b = √3. 1. **Square the first term (a²):** (√x)² = x 2. **Square the second term (b²):** (√3)² = 3 3. **Subtract the second result from the first (a² - b²):** x - 3 The simplified expression is **x - 3**. **Final Answers:** (√x + 2√3)² = **x + 12 + 4√(3x)** (√x + √3)(√x - √3) = **x - 3** | |---|---| | **Model:** | gemini-2.5-pro | | **Temperature:** | 0.2 | | **Max output tokens:** | 8192 | | **TopK:** | 40.0 | | **TopP:** | 0.95 | |