# Calc 3 HW - Differentials

Page 1 of 1

## 2 Replies - 3948 Views - Last Post: 29 November 2013 - 12:18 PM

### #1 streek405

Reputation: 15
• Posts: 721
• Joined: 10-March 13

# Calc 3 HW - Differentials

Posted 13 November 2013 - 02:46 PM

Can someone please tell me what I'm doing wrong for this problem:

If R is the total resistance of two resistors connected in parallel with resistances R_1 and R_2, then R = \frac{R_1 R_2}{R_1 + R_2}. If R_1 is measured to be 15 ohms with a possible percentage error of 3 percent while R_2 is measured to be 35 ohms with a possible percentage error of 5 percent, use differentials to estimate the maximum percentage error in the calculation of R.

my work: R = 15*35/(15+35) = 10.5
soooo... 10.5 + 15(.03) + 35(.05) = 12.7

Is This A Good Question/Topic? 0

## Replies To: Calc 3 HW - Differentials

### #2 jjl

• Engineer

Reputation: 1270
• Posts: 4,998
• Joined: 09-June 09

## Re: Calc 3 HW - Differentials

Posted 16 November 2013 - 06:10 PM

Plug in the values into the equation that produce the biggest difference from the solution with zero percent error.

### #3 x68zeppelin80x

Reputation: 130
• Posts: 576
• Joined: 07-March 09

## Re: Calc 3 HW - Differentials

Posted 29 November 2013 - 12:18 PM

I have provided a full explanation of the process for obtaining the percentage in comment below. There are 2 function: A verbose function that explains every step, and a minified version, which is essentially the same thing but optimized.

/**
*  Explanation:
*
*  R1_Resistance        16        // Given
*  R2_Resistance        34        // Given
*  R1_Possible Error     0.0300   // Given
*  R2_Possible Error     0.0500   // Given
*  R1_Delta              0.4500   // R1_Resistance * R1 Possible Error
*  R2_Delta              1.7500   // R1 Resistance * R1 Possible Error
*  R1_Coefficient        0.4900   // R2_Resistance^2 / (R1_Resistance + R2_Resistance)^2
*  R2_Coefficient        0.0900   // R1_Resistance^2 / (R1_Resistance + R2_Resistance)^2
*  R1_Error              0.2205   // R1_Delta * R1_Coefficient
*  R2_Error              0.1575   // R2_Delta * R2_Coefficient
*  Delta_R               0.3780   // R1_Error + R2_Error
*  Total_Resistance     10.5000   // (R1_Resistance * R2_Resistance) / (R1_Resistance + R2_Resistance)
*  Maximum_Error         0.0360   // Delta_R / Total_Resistance
*/
public class Resistance {
public static void main(String[] args) throws java.lang.Exception {
double r1 = 15, r2 = 35, e1 = 0.03, e2 = 0.05;

displayResult("Long Method", compute1(r1, e1, r2, e2));
displayResult("Short Method", compute2(r1, e1, r2, e2));

// Output:
// -------
// Long Method  : 3.6000%
// Short Method : 3.6000%
}

public static double compute1(double r1, double e1, double r2, double e2) {
double dr1 = r1 * e1, dr2 = r2 * e2;
double cd = Math.pow(r1 + r2, 2);
double c1 = Math.pow(r2, 2) / cd, c2 = Math.pow(r1, 2) / cd;
double r1e = dr1 * c1, r2e = dr2 * c2;
double deltaR = r1e + r2e;
double totR = (r1 * r2) / (r1 + r2);
double maxErr = deltaR / totR;

return maxErr;
}

public static double compute2(double r1, double e1, double r2, double e2) {
return ((r1 * e2) + (r2 * e1)) / (r1 + r2);
}

// Helper functions follow:

public static void displayResult(String label, double result) {
System.out.printf("%-13s: %s\n", label, toPercentage(result));
}

public static String toPercentage(double fractionalValue) {
return String.format("%.4f%%", fractionalValue * 100);
}
}


This post has been edited by x68zeppelin80x: 29 November 2013 - 02:36 PM