Product Rule Calculator
Basic Calculator
Advanced Calculator
Enter the functions and their derivatives to calculate the product rule
Function 1 (f(x))
Derivative of Function 1 (f'(x))
Function 2 (g(x))
Derivative of Function 2 (g'(x))
Product Rule Result
Function 1 (f(x))
Derivative of Function 1 (f'(x))
Function 2 (g(x))
Derivative of Function 2 (g'(x))
Product Rule Result
Calculate
Reset
function showBasic() {
document.getElementById("basicCalculator").style.display = 'block';
document.getElementById("advancedCalculator").style.display = 'none';
}
function showAdvanced() {
document.getElementById("advancedCalculator").style.display = 'block';
document.getElementById("basicCalculator").style.display = 'none';
}
function calculate() {
if (document.getElementById("basicCalculator").style.display !== 'none') {
const f = document.getElementById("function1").value;
const df = document.getElementById("derivative1").value;
const g = document.getElementById("function2").value;
const dg = document.getElementById("derivative2").value;
if (f && df && g && dg) {
const productRuleResult = `(${f})(${dg}) + (${g})(${df})`;
document.getElementById("productRule").value = productRuleResult;
} else {
alert("Please fill in all fields to calculate the product rule.");
}
} else {
const f = document.getElementById("function3").value;
const df = document.getElementById("derivative3").value;
const g = document.getElementById("function4").value;
const dg = document.getElementById("derivative4").value;
if (f && df && g && dg) {
const productRuleResult = `(${f})(${dg}) + (${g})(${df})`;
document.getElementById("advProductRule").value = productRuleResult;
} else {
alert("Fill in all fields to calculate the product rule.");
}
}
}
function resetFields() {
document.getElementById("function1").value = '';
document.getElementById("derivative1").value = '';
document.getElementById("function2").value = '';
document.getElementById("derivative2").value = '';
document.getElementById("productRule").value = '';
document.getElementById("function3").value = '';
document.getElementById("derivative3").value = '';
document.getElementById("function4").value = '';
document.getElementById("derivative4").value = '';
document.getElementById("advProductRule").value = '';
}
.styled-input {
border: 2px solid #0093da;
border-radius: 5px;
padding: 10px;
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
background-color: #fff;
transition: all 0.3s ease;
}
.styled-input:focus {
border-color: #007bb5;
box-shadow: 0 0 5px rgba(0, 115, 175, 0.5);
outline: none;
}
Enter your functions and their derivatives into the calculator to determine the product rule result.
Product Rule Calculation Formula
The following formula is used to calculate the derivative of the product of two functions.
(f(x)g(x))' = f'(x)g(x) + f(x)g'(x)
Variables:
f(x) is the first function
g(x) is the second function
f'(x) is the derivative of the first function
g'(x) is the derivative of the second function
To calculate the derivative of the product of two functions, you need to multiply the first function by the derivative of the second function and add it to the second function multiplied by the derivative of the first function.
What is the Product Rule?
The product rule is a formula used to find the derivative of the product of two functions.