TransWikia.com

Different area by changing the tangent point

Mathematica Asked on May 31, 2021

I have code

f[x_] := x^3;
df[x_] = f'[x];
tan[x_, x0_] := f[x0] + df[x0] (x - x0)
With[{x0 = 1}, NSolve[tan[x, x0] == f[x], x]]
With[{x1 = -2}, NSolve[tan[x, x1] == f[x], x]]
Module[{x, pts, names, offsets, ptlbls, arealbls}, x[0] = 1; 
 x[1] = -2; x[2] = 4;
 pts = {{x[0], f[x[0]]}, {x[1], f[x[1]]}, {x[2], f[x[2]]}};
 names = {"p1", "p2", "p3"};
 offsets = {{10, -10}, {10, -10}, {-15, 3}};
 ptlbls = MapThread[Text[#1, Offset[#2, #3]] &, {names, offsets, pts}];
 arealbls = {Text["A", Offset[{-20, 2}, (pts[[1]] + pts[[2]])/2]], 
   Text["B", Offset[{0, -15}, (pts[[2]] + pts[[3]])/2]]};
 Plot[Evaluate@{f[x], tan[x, x[0]], tan[x, x[1]]}, {x, -3, 5}, 
  Epilog -> {ptlbls, {Red, AbsolutePointSize[5], Point[pts]}, 
    arealbls}]]

R = Range[-4, 0, .4];
A = NIntegrate[Abs[f[x] - tan[x, x0]], {x, x1, x3}]???
B = NIntegrate[Abs[tan[x, x1] - f[x]], {x, -4, -3.6}]??
B==16A;

I was cut by the last step
I want to change point pt1 in the region -4,0 to get 10 differents area of A and B which means I need 10 points of pt1, so that I could verify B=16A, but I couldn’t build the variable P to make it change of the value automatically

enter image description here

2 Answers

You can also verify the result without draw the pictures.

f[x_] = x^3;
Do[tan[x_, p_] = f[p] + f'[p] (x - p);
 x0 = RandomReal[{-4, 0}] // Rationalize;
 x2 = x /. Solve[f[x0] + f'[x0] (x - x0) == f[x] && x != x0, x] // 
   First;
 x1 = p /. Solve[tan[x0, p] == f[x0] && p != x0, p] // First;
 reg1 = ImplicitRegion[{x0 <= x <= x1, tan[x, x1] <= y <= f[x]}, {x, 
    y}];
 reg2 = ImplicitRegion[{x0 <= x <= x2, f[x] <= y <= tan[x, x0]}, {x, 
    y}];
 Print[{Area[reg2], Area[reg1], Area[reg2]/Area[reg1]}], 10]

{517.446,32.3404,16.} {0.109673,0.00685459,16.} {971.049,60.6906,16.} ...

Correct answer by cvgmt on May 31, 2021

If we assume x0 < 0 in Area,we can prove this result by Mathematica !

f[x_] = x^3;
tan[x_, p_] = f[p] + f'[p] (x - p);
p1[x0_] = x /. Solve[tan[x0, x] == f[x0] && x != x0, x] // First;
p2[x0_] = x /. Solve[tan[x, x0] == f[x] && x != x0, x] // First;

reg1 = ImplicitRegion[{x0 <= x <= p1[x0], 
    tan[x, p1[x0]] <= y <= f[x]}, {x, y}];
reg2 = ImplicitRegion[{x0 <= x <= p2[x0], 
    f[x] <= y <= tan[x, x0]}, {x, y}];
Area[reg1, Assumptions -> x0 < 0]
Area[reg2, Assumptions -> x0 < 0]
%/%%

(27 x0^4)/64

(27 x0^4)/4

16

Answered by cvgmt on May 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP