Question
matlab code
Given the boundary value problem: daw = W 3 dw dc2 de w(x = 1) = 5 w(x = 10) = 5 Find the minimum value of wover this region
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The detailed solution is given below.

d²w du? 3 do dn let, do % = f(z) dn dz du w-3t = f(w,z) Shooting Method an With = Wit care andi onl Will= wit f (Z;) eu Zit =

clear;
clc;

% Shooting Method
f1 = @(z) z;
f2 = @(w,z) w - 3*z;

h = 0.001;
a = 1;
b = 10;

% Initialize
x = a:h:b;
n = numel(x);
w = zeros(1,numel(x));
w(1) = 5;
z = zeros(1,numel(x));
z(1) = -15.33;

for i=1:n-1
    w(i+1) = w(i) + f1(z(i))*h;
    z(i+1) = z(i) + f2(w(i),z(i))*h;
end
fprintf('Minimum Value of w=%.2f\n',round(min(w),2))

figure(1)
hold on
plot(b,5,'ko','MarkerFaceColor','k','DisplayName','Actual Value at x = 10')
plot(x,w,'r-','DisplayName','Shooting Method','linewidth',2)
legend show
xlabel('x')
ylabel('w')
grid on

5.5 5 Actual Value at x = 10 Shooting Method 4.5 4 3.5 3 3 2.5 2 1.5 1 0.5 1 2 3 4 5 6 7 8 9 10 X

Output

Minimum Value of w=0.55 >> |

Thus the first option is correct.

Please rate the solution if found satisfactory.

Add a comment
Know the answer?
Add Answer to:
matlab code Given the boundary value problem: daw = W 3 dw dc2 de w(x =...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT